]> source.dussan.org Git - tigervnc.git/commit
Add support for notifying clients about pointer movements 1198/head
authorlhchavez <lhchavez@lhchavez.com>
Mon, 8 Feb 2021 00:36:47 +0000 (16:36 -0800)
committerlhchavez <lhchavez@lhchavez.com>
Tue, 2 Mar 2021 16:36:53 +0000 (08:36 -0800)
commitcb8629a213a6fc0988bb603e31ffcecc25646e01
tree745f407aae4ce03c475e998f598576f2b4c0d849
parent0c8b68f88ec4ef5c78dcf8ad8427996ee962e6e9
Add support for notifying clients about pointer movements

This change adds support for the VMware Mouse Position
pseudo-encoding[1], which is used to notify VNC clients when X11 clients
call `XWarpPointer()`[2]. This function is called by SDL (and other
similar libraries)  when they detect that the server does not support
native relative motion, like some RFB clients.

With this, RFB clients can choose to adjust the local cursor position
under certain circumstances to match what the server has set. For
instance, if pointer lock has been enabled on the client's machine and
the cursor is not being drawn locally, the local position of the cursor
is irrelevant, so the RFB client can use what the server sends as the
canonical absolute position of the cursor. This ultimately enables the
possibility of games (especially FPS games) to behave how users expect
(if the clients implement the corresponding change).

Part of: #619

1: https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#vmware-cursor-position-pseudo-encoding
2: https://tronche.com/gui/x/xlib/input/XWarpPointer.html
3: https://hg.libsdl.org/SDL/file/28e3b60e2131/src/events/SDL_mouse.c#l804
17 files changed:
common/rfb/ClientParams.cxx
common/rfb/ClientParams.h
common/rfb/SMsgWriter.cxx
common/rfb/SMsgWriter.h
common/rfb/VNCSConnectionST.cxx
common/rfb/VNCSConnectionST.h
common/rfb/VNCServer.h
common/rfb/VNCServerST.cxx
common/rfb/VNCServerST.h
common/rfb/encodings.h
unix/x0vncserver/XDesktop.cxx
unix/xserver/hw/vnc/XserverDesktop.cc
unix/xserver/hw/vnc/XserverDesktop.h
unix/xserver/hw/vnc/vncExtInit.cc
unix/xserver/hw/vnc/vncExtInit.h
unix/xserver/hw/vnc/vncHooks.c
win/rfb_win32/SDisplay.cxx