W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

Re: Mouse Lock

From: Simon Pieters <simonp@opera.com>
Date: Wed, 22 Jun 2011 11:20:10 +0200
To: "Tab Atkins Jr." <jackalmage@gmail.com>, "Aryeh Gregor" <Simetrical+w3c@gmail.com>
Cc: "Adam Barth" <w3c@adambarth.com>, "Vincent Scheib" <scheib@google.com>, "Brandon Andrews" <warcraftthreeft@sbcglobal.net>, "Gregg Tavares (wrk)" <gman@google.com>, "Glenn Maynard" <glenn@zewt.org>, "Charles Pritchard" <chuck@jumis.com>, "Kenneth Russell" <kbr@google.com>, robert@ocallahan.org, public-webapps@w3.org
Message-ID: <op.vxgz7wt2idj3kv@simon-pieterss-macbook.local>
On Tue, 21 Jun 2011 00:43:52 +0200, Aryeh Gregor  
<Simetrical+w3c@gmail.com> wrote:

> On Mon, Jun 20, 2011 at 1:48 PM, Tab Atkins Jr. <jackalmage@gmail.com>  
> wrote:
>> A model which I suggested privately, and which I believe others have
>> suggested publicly, is this:
>>
>> 1. While fullscreen is enabled, you can lock the mouse to the
>> fullscreened element without a prompt or persistent message.  A
>> temporary message may still be shown.  The lock is automatically
>> released if the user exits fullscreen.
>>
>> 2. During a user-initiated click, you can lock the mouse to the target
>> or an ancestor without a permissions prompt, but with a persistent
>> message, either as an overlay or in the browser's chrome.
>>
>> 3. Otherwise, any attempt to lock the mouse triggers a permissions
>> prompt, and while the lock is active a persistent message is shown.
>
> There's a middle ground here: you can lock the mouse to the window,
> but not completely.  That is, if the user moves the mouse to the edge,
> it remains inside, but if they move it fast enough it escapes.  This
> is enough to stop the window from accidentally losing focus when
> you're trying to click on something near the edge of the screen, but
> it lets you easily get outside the window if you actually want to.
> IIRC, Wine does this in windowed mode.  Of course, it might not be
> suitable for games that want to hide the cursor, like FPSes, but it
> might be a possible fallback if the browser doesn't trust the site
> enough for whatever reason to let it fully lock the mouse.

This seems weird. When would you use this middle ground? Would users  
understand it? Also, as you say, totally inappropriate for FPS games.

-- 
Simon Pieters
Opera Software
Received on Wednesday, 22 June 2011 09:20:50 GMT

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