10.10.6 MapNotify

The X server can report MapNotify events to clients wanting information about which windows are mapped. The X server generates this event type whenever a client application changes the window's state from unmapped to mapped by calling XMapWindow(), XMapRaised(), XMapSubwindows(), XReparentWindow(), or as a result of save-set processing.

Select With

To receive MapNotify events, set the StructureNotifyMask bit in the event-mask attribute of the window or the SubstructureNotifyMask bit in the event-mask attribute of the parent window (in which case, mapping any child generates an event).

The structure for this event type contains:


typedef struct {
	int type;		/* MapNotify */
	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 event;
	Window window;
	Bool override_redirect;	/* boolean, is override set... */
} XMapEvent;

The event member is set either to the window that was mapped or to its parent, depending on whether StructureNotify or SubstructureNotify was selected.
The window member is set to the window that was mapped.
The override_redirect member is set to the override-redirect attribute of the window. Window manager clients normally should ignore this window if the override-redirect attribute is True, because these events usually are generated from pop-ups, which override structure control.

Next: MappingNotify Events

Christophe Tronche, [email protected]