Changes

Jump to: navigation, search

Implementing the Mouse Lock API in Firefox

334 bytes removed, 10:05, 2 December 2011
Implementation
# "When unlocked, the system cursor can exit and re-enter the user agent window. If it does so and the user agent was not the target of operating system mouse move events then the most recent mouse position will be unknown to the user agent and movementX/Y can not be computed and must be set to zero" diogogmt
# Trying to lock a locked element should fire the success callback - <strong>CloudScorpion</strong>
# <s>Before locking the mouse check if the element is a DOM element and if it is in the DOM Tree </s> diogogmt
# Fix accurateness of mouse positioning on unlock() (should be the same point as when lock() was called). Currently works, but is offset. See nsEventStateManager::SetMouseLock. - JSilver999
# <s>Restructure Lock method to do most of its operations in a separate thread.</s> humph
# Fix license headers for new files to use proper [http://www.mozilla.org/MPL/boilerplate-1.1/ MPL boilerplate] - humph
# <s>Do we need to add a user pref to enable/disable mouse lock? Nice to have, not blocking.</s> northwind, mjschranz
 
=====Out of Scope Implementation=====
## [http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/Quartz_Services_Ref/Reference/reference.html CGAssociateMouseAndMouseCursorPosition and CGGetLastMouseDelta] on OS X
## [http://www.x.org/archive/X11R6.8.2/doc/XGrabPointer.3.html XGrabPointer] on Linux
# Do we need to add a user pref to enable/disable mouse lock? Nice to have, not blocking. - northwind, mjschranz
See http://mxr.mozilla.org/mozilla-central/source/modules/libpref/src/init/all.js#3379
<pre>
3379 // DOM full-screen API.
3380 pref("full-screen-api.enabled", false);
3381 pref("full-screen-api.allow-trusted-requests-only", true);
3382 pref("full-screen-api.key-input-restricted", true);
3383 pref("full-screen-api.warning.enabled", true);
</pre>
====Tests====

Navigation menu