To receive
MapRequest
events, set the
SubstructureRedirectMask
bit in the event-mask attribute of the window.
This means another client's attempts to map a child window by calling one of
the map window request functions is intercepted, and you are sent a
MapRequest
instead.
For example, suppose a client application calls
XMapWindow()
to map a window.
If you (usually a window manager) had selected
SubstructureRedirectMask
on the parent window and if the override-redirect attribute
of the window is set to
False,
the X server reports a
MapRequest
event to you
and does not map the specified window.
Thus, this event gives your window manager client the ability
to control the placement of subwindows.
The structure for this event type contains:
The parent member is set to the parent window.
The window member is set to the window to be mapped.
typedef struct {
int type; /* MapRequest */
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 parent;
Window window;
} XMapRequestEvent;
Next: ResizeRequest Events
Christophe Tronche, ch@tronche.com