xpra icon
Bug tracker and wiki

Opened 8 years ago

Closed 8 years ago

#205 closed enhancement (fixed)

better cursor forwarding using cursor_name and/or pixel data

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: minor Milestone: 0.8
Component: core Version: trunk
Keywords: Cc:

Description

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?)

Change History (2)

comment:1 Changed 8 years ago by 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

comment:2 Changed 8 years ago by Antoine Martin

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.