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.
MapRequest
イベントを受け取るには、
ウインドウの
event-mask
属性の
SubstructureRedirectMask
ビットを設定する。
これは
他のクライアントがウインドウマップリクエスト機能を呼ぶ事で
子ウインドウをマップしようとする試みに割り込み、
代わりに
MapRequest
はあなたに送られることを意味する。
例えば、
クライアントアプリケーションがウインドウをマップするために
XMapWindow()
を呼ぶのを想定した場合に、
親ウインドウで
SubstructureRedirectMask
を選択していて(一般的にはウィンドウマネージャ)、
そのウインドウの
override-redirect
属性に
False
が設定されているのならば、
X サーバーはあなたに
MapRequest
を通知して、
指定されたウインドウはマップしない。
このイベントはウインドウ・マネージャー・
クライアントにサブウインドウの配置を制御する能力を与える。
このイベントのための構造体を以下に示す:
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;
parent
メンバーには親ウインドウが設定される。
windowにはメンバーはマップされたサブウインドウが設定される。
Next: ResizeRequest Events
Christophe Tronche, ch.tronche@computer.org