This subsystem synchronizes the pointer cursor between the server’s (often virtual) screen and the client.
The prefix for all packets and capabilities is cursor.
| Component | Link |
|---|---|
| client | xpra.client.subsystem.cursor |
| client connection | xpra.server.source.cursor |
| server | xpra.server.subsystem.cursor |
| Capability | Type | Purpose |
|---|---|---|
encodings |
array of strings | The types of cursor packets that the client can handle |
The supported encodings are:
raw: plain uncompressed BGRA pixel datapng: pixel data compressed using lossless full color PNGdefault: the client can update the default cursor| Capability | Type | Purpose |
|---|---|---|
default |
cursor packet data | The default cursor to use |
default_size |
integer | The default size of cursors on the server |
max_size |
pair of integers | The maximum size of the server cursors |
json lines
{
'cursor': {
'encodings': ['raw', 'default', 'png'],
},
}
json lines
{
'cursor': {
'default_size': 45,
'max_size': [64, 64],
}
}
| Packet Type | Direction | Arguments | Purpose |
|---|---|---|---|
cursor-set |
client to server | boolean | Tell the server to enable or disable cursors |
cursor-data |
server to client | cursor packet data | Use the cursor specified |
cursor-default |
server to client | Restore the default cursor |
cursor-data contains, in order: encoding, width, height, hotspot X, hotspot Y,
serial number, encoded bytes and cursor name. raw bytes are RGBA pixels
with straight (not premultiplied) alpha; png bytes contain a PNG image. The hotspot must lie within the cursor image.
X11 and Wayland servers older than 7.0 send png cursors with the red and blue
channels swapped, and clients older than 7.0 swap them back.