10.13.2 PropertyNotify Events

The X server can report PropertyNotify events to clients wanting information about property changes for a specified window.

To receive PropertyNotify events, set the PropertyChangeMask bit in the event-mask attribute of the window.

The structure for this event type contains:

typedef struct {
	int type;		/* PropertyNotify */
	unsigned long serial;	/* # of last request processed by server */
	Bool send_event;	/* true if this came from a SendEvent request */
	Display *display;	/* Display the event was read from */
	Window window;
	Atom atom;
	Time time;
	int state;		/* PropertyNewValue or PropertyDelete */
} XPropertyEvent;

The window member is set to the window whose associated property was changed. The atom member is set to the property's atom and indicates which property was changed or desired. The time member is set to the server time when the property was changed. The state member is set to indicate whether the property was changed to a new value or deleted and can be PropertyNewValue or PropertyDelete. The state member is set to PropertyNewValue when a property of the window is changed using XChangeProperty() or XRotateWindowProperties() (even when adding zero-length data using XChangeProperty()) and when replacing all or part of a property with identical data using XChangeProperty() or XRotateWindowProperties(). The state member is set to PropertyDelete when a property of the window is deleted using XDeleteProperty() or, if the delete argument is True, XGetWindowProperty().

Next: SelectionClear Events

Christophe Tronche, [email protected]