W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2011

Re: Mouse Capture for Canvas

From: Robert O'Callahan <robert@ocallahan.org>
Date: Thu, 10 Feb 2011 18:25:50 +1300
Message-ID: <AANLkTinYYNnTmmayp5_HojiLf2Y30bnaBrAqZTGtoiOH@mail.gmail.com>
To: Glenn Maynard <glenn@zewt.org>
Cc: Brandon Andrews <warcraftthreeft@sbcglobal.net>, Kenneth Russell <kbr@google.com>, public-webapps@w3.org
On Thu, Feb 10, 2011 at 5:32 PM, Glenn Maynard <glenn@zewt.org> wrote:

> It applies to non-game uses, too.  For example, a common annoyance with
> Google Maps is when you're dragging the map and your mouse cursor hits the
> side of the screen, the map stops moving; you have to release the button and
> reposition the cursor.  Mouse grabbing would trivially fix this.
>

Sure, but this is not a use-case for capturing while the mouse button is up.

At least in Windows, it's hard to get deltas without grabbing the mouse.  If
> the mouse cursor is at the right edge of the screen and the user moves the
> mouse to the right, Windows doesn't report the motion--the clamping happens
> too early on.  Games work around this by hiding the mouse cursor and
> constantly warping the hidden cursor to the center of the screen, which is
> probably what browsers would do too.
>

Hmm, interesting. That might make things nasty indeed.

Rob
-- 
"Now the Bereans were of more noble character than the Thessalonians, for
they received the message with great eagerness and examined the Scriptures
every day to see if what Paul said was true." [Acts 17:11]
Received on Thursday, 10 February 2011 05:50:54 GMT

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