Xpra: Ticket #205: better cursor forwarding using cursor_name and/or pixel data

This may also fix:

We can just add a dependency on Xfixes >=2 since it was released in 2003

Then we have access to:

typedef struct {
    short           x, y;
    unsigned short  width, height;
    unsigned short  xhot, yhot;
    unsigned long   cursor_serial;
    unsigned long   *pixels;
#if XFIXES_MAJOR >= 2
    Atom            atom;                   /* Version >= 2 only */
    const char      *name;                  /* Version >= 2 only */
#endif
} XFixesCursorImage;

and

typedef struct {
    short           x, y;
    unsigned short  width, height;
    unsigned short  xhot, yhot;
    unsigned long   cursor_serial;
    unsigned long   *pixels;
    Atom            atom;
    const char      *name;
} XFixesCursorImageAndName;

The name was already available in:

typedef struct {
    int type;                   /* event base */
    unsigned long serial;
    Bool send_event;
    Display *display;
    Window window;
    int subtype;
    unsigned long cursor_serial;
    Time timestamp;
    Atom cursor_name;
} XFixesCursorNotifyEvent;

Once we know the cursor name, we can forward it to the client. If the client does not have a cursor by that name in its current theme, maybe we can fallback to sending the cursor's pixels? (and to avoid roundtrips - always send those?)



Sat, 03 Nov 2012 08:52:52 GMT - Antoine Martin:

Done the easy way in r2030: we just grab the cursor_name from the event and pass it to the client (if it supports the feature) and it looks up the cursor.

I don't think we need to worry about the theme or cursor size: we just use whatever is configured on the client. In theory, we could also pass those settings to the server so that applications which do use those APIs can get the real values used and not the default ones. meh - made more difficult since we support multiple clients: which one would we choose?

Will close this ticket once I have feedback on #189 and #192


Sun, 11 Nov 2012 09:29:53 GMT - Antoine Martin: status changed; resolution set


Sat, 23 Jan 2021 04:48:23 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/205