noVNC/tests
lhchavez 30f9d4eee9 Support grabbing the pointer with the Pointer Lock API
This change adds the following:

a) A new button on the UI to enter full pointer lock mode, which invokes
   the Pointer Lock API[1] on the canvas, which hides the cursor and
   makes mouse events provide relative motion from the previous event
   (through `movementX` and `movementY`). These can be added to the
   previously-known mouse position to convert it back to an absolute
   position.
b) Adds support for the VMware Cursor Position pseudo-encoding[2], which
   servers can use when they make cursor position changes themselves.
   This is done by some APIs like SDL, when they detect that the client
   does not support relative mouse movement[3] and then "warp"[4] the
   cursor to the center of the window, to calculate the relative mouse
   motion themselves.
c) When the canvas is in pointer lock mode and the cursor is not being
   locally displayed, it updates the cursor position with the
   information that the server sends, since the actual position of the
   cursor does not matter locally anymore, since it's not visible.
d) Adds some tests for the above.

You can try this out end-to-end with TigerVNC with
https://github.com/TigerVNC/tigervnc/pull/1198 applied!

Fixes: #1493 under some circumstances (at least all SDL games would now
work).

1: https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API
2: https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#vmware-cursor-position-pseudo-encoding
3: https://hg.libsdl.org/SDL/file/28e3b60e2131/src/events/SDL_mouse.c#l804
4: https://tronche.com/gui/x/xlib/input/XWarpPointer.html
2021-02-07 20:16:19 -08:00
..
.eslintrc Enforce function names 2018-09-06 16:53:40 +02:00
assertions.js Remove many small, obsolete, old browser hacks 2020-12-07 10:10:53 +01:00
fake.websocket.js Remove createEvent() fallbacks 2020-12-07 10:10:53 +01:00
playback-ui.js Ignore recording variables in our linter 2020-09-05 11:08:16 +02:00
playback.js Fix call to _recvMessage() 2020-09-04 10:40:42 +02:00
test.base64.js Enforce space after function name 2018-09-06 17:34:15 +02:00
test.copyrect.js Handle empty rects in RAW decoder as well 2020-09-07 12:58:52 +02:00
test.deflator.js Add camelCase rule to eslint 2020-05-31 23:37:29 +02:00
test.display.js Remove createImageData() fallback 2020-12-07 10:10:53 +01:00
test.gesturehandler.js Drop support for Internet Explorer 2020-10-15 18:53:51 +02:00
test.helper.js Send combination keysyms for some Japanese keys 2020-12-10 10:00:44 +01:00
test.hextile.js Handle empty rects in RAW decoder as well 2020-09-07 12:58:52 +02:00
test.int.js Add util for unsigned and signed int. conversion 2020-02-17 11:29:40 +01:00
test.keyboard.js Remove some unnecessary use of done argument 2020-12-10 10:21:21 +01:00
test.localization.js Drop support for Internet Explorer 2020-10-15 18:53:51 +02:00
test.raw.js Handle empty rects in RAW decoder as well 2020-09-07 12:58:52 +02:00
test.rfb.js Support grabbing the pointer with the Pointer Lock API 2021-02-07 20:16:19 -08:00
test.rre.js Handle empty rects in RAW decoder as well 2020-09-07 12:58:52 +02:00
test.tight.js Handle empty rects in RAW decoder as well 2020-09-07 12:58:52 +02:00
test.tightpng.js Add workaround for Firefox PNG rounding bug 2020-09-28 12:24:56 +02:00
test.util.js Standardize on camelCase in Logging 2020-05-31 23:37:29 +02:00
test.websock.js Standardize on camelCase in Websock 2020-05-31 23:21:35 +02:00
test.webutil.js Drop support for Internet Explorer 2020-10-15 18:53:51 +02:00
vnc_playback.html Remove legacy conversion of modules 2020-10-15 18:53:51 +02:00