10.11.3 MapRequest Events

The X server can report MapRequest events to clients wanting information about a different client's desire to map windows. A window is considered mapped when a map window request completes. The X server generates this event whenever a different client initiates a map window request on an unmapped window whose override_redirect member is set to False . Clients initiate map window requests by calling XMapWindow(), XMapRaised(), or XMapSubwindows().
X サーバーは異なるクライアントがウインドウをマップ(map)しようとしていると言う情報を要求するクライアントに MapRequest イベントを通知する。 ウインドウマップ(map)リクエストが完了した時、 ウインドウはマップされたとみなす。 X サーバーは異なるクライアントが False が設定されている override_redirect メンバーを持つ マッピングされていないウインドウ(unmapped window)において、 ウインドウマップリクエストを起こした時は必ずこのイベントを発生する。 クライアントは XMapWindow(), XMapRaised(), XMapSubwindows() のいずれかを呼ぶ事でウインドウマップリクエストを起こす。

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

The structure for this event type contains:
このイベントのための構造体を以下に示す:


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;

The parent member is set to the parent window. The window member is set to the window to be mapped.
parent メンバーには親ウインドウが設定される。 windowにはメンバーはマップされたサブウインドウが設定される。

Next: ResizeRequest Events

Christophe Tronche, ch.tronche@computer.org