W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

Re: Mouse Lock

From: Jonas Sicking <jonas@sicking.cc>
Date: Fri, 12 Aug 2011 14:06:48 -0700
Message-ID: <CA+c2ei_Byq-nxQy_8ur0hRGWRoLFiWCwqsFnJS1Tk7s0eKxLGA@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: robert@ocallahan.org, Vincent Scheib <scheib@google.com>, Klaas Heidstra <klaas1988@gmail.com>, Brandon Andrews <warcraftthreeft@sbcglobal.net>, Olli@pettay.fi, Ryosuke Niwa <rniwa@webkit.org>, Adam Barth <w3c@adambarth.com>, "Gregg Tavares (wrk)" <gman@google.com>, Glenn Maynard <glenn@zewt.org>, Charles Pritchard <chuck@jumis.com>, Kenneth Russell <kbr@google.com>, public-webapps@w3.org
On Fri, Aug 12, 2011 at 1:54 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Fri, Aug 12, 2011 at 1:19 PM, Jonas Sicking <jonas@sicking.cc> wrote:
>> On Fri, Aug 12, 2011 at 9:53 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>>> On Thu, Aug 11, 2011 at 10:14 PM, Robert O'Callahan
>>> <robert@ocallahan.org> wrote:
>>>> If your implementation had to warp the mouse cursor on Windows to get
>>>> accurate delta information, the mouse position in the existing mouse
>>>> events would no longer be very meaningful and a new event type seemed
>>>> more logical. But assuming Klaas is right, we no longer need to worry
>>>> about this. It seems we can unconditionally add delta information to
>>>> existing mouse events. So I withdraw that comment.
>>>
>>> I suspect that, while locked, we still don't actually want to expose
>>> the various x and y properties for the mouse.  I agree with Vincent
>>> that the *other* mouseevent properties are all useful, though, and
>>> that the delta properties are really useful in non-mouselock
>>> situations.
>>>
>>> We should just zero all the position information.  Even if we can
>>> switch all OSes to a delta mode, the position will be arbitrary and
>>> meaningless.  This seems easier than making a new type of mouse event
>>> that exposes all of normal mouse events except the position, and
>>> ensuring that the two stay in sync when we add new info.
>>
>> If we expose delta information in all mouse events, which seems like
>> it could be a good idea, then what is the usecase for the success
>> callback for mouselock?
>>
>> I was under the impression that that was so that the page could start
>> treating mousemove events differently, but if all mousemove events
>> have deltas, then that won't be needed, no?
>
> No, it's still definitely needed.  You can't do an FPS with non-locked
> deltas; the user will end up moving their mouse off the screen.
>
> The use-cases for delta-without-mouselock are pretty separate from
> those for delta-within-mouselock.

Sure, I wasn't saying that mouselock wasn't needed. I was asking what
the use case for the 'success' callback to the mouseLock was.

/ Jonas
Received on Friday, 12 August 2011 21:07:54 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:47 GMT