Name

SelectionNotify — xselection

When Generated

A SelectionNotify event is sent only by clients, not by the server, by calling XSendEvent(). The owner of a selection sends this event to a requestor (a client that calls XConvertSelection() for a given property) when a selection has been converted and stored as a property or when a selection conversion could not be performed (indicated with property None).

Select With

There is no event mask for SelectionNotify events, and they are not selected with XSelectInput. Instead XSendEvent directs the event to a specific window, which is given as a window ID: PointerWindow, which identifies the window the pointer is in, or InputFocus, which identifies the focus window.

XEvent Structure Name

typedef union _XEvent {
    ...
    XSelectionEvent xselection;
    ...
} XEvent;

Event Structure

typedef struct {
    int type;
    unsigned long serial;    /* # of last request processed by server */
    Bool send_event;         /* True if this came from SendEvent request */
    Display *display;        /* Display the event was read from */
    Window requestor;
    Atom selection;
    Atom target;
    Atom property;           /* Atom or None */
    Time time;
} XSelectionEvent;

Event Structure Members

The members of this structure have the values specified in the XConvertSelection call that triggers the selection owner to send this event, except that the property member either will return the atom specifying a property on the requestor window with the data type specified in target or will return None, which indicates that the data could ...

Get XLIB Programming Manual, Rel. 5, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.