This pseudo-encoding is used to allow the pointer to be in either absolute or relative mode. In absolute mode (the default mode), the client sends the server coordinates that represent the position of the cursor on the framebuffer. In relative mode, the client sends the server a x and y deltas for how much the pointer has moved. The server may multiple this value (or even warp the pointer without telling the client).

Relative mode allows the client to control a pointer even if the server does not know where the cursor is on the screen. In the framebuffer update, the encoding type is set to -257. The x coordinate is 0 if the pointer is in relative mode. The x coordinate is 1 if the pointer is in absolute mode. The server will send an update any time the pointer type changes and immediately after a SetEncodings client message.

When in relative mode, the meaning and type of the x-position and y-position parameter of the PointerEvent client message changes. The type of the parameters becomes S16 and the parameters represent the relative motion of the pointer since the last PointerEvent client message.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.