10.11.2 ConfigureRequest Events

The X server can report ConfigureRequest events to clients wanting information about when a different client initiates a configure window request on any child of a specified window. The configure window request attempts to reconfigure a window's size, position, border, and stacking order. The X server generates this event whenever a different client initiates a configure window request on a window by calling XConfigureWindow(), XLowerWindow(), XRaiseWindow(), XMapRaised(), XMoveResizeWindow(), XMoveWindow(), XResizeWindow(), XRestackWindows(), or XSetWindowBorderWidth().
X サーバーは指定したウインドウの子ウインドウに対し 異なるクライアントからウインドウ再構成リクエスト (configure window request) が発せられた時、 その情報を待つクライアントに ConfigureRequest イベントを通知する。 ウインドウ再構築リクエスト (configure window request) はウインドウのサイズ、 位置、 ボーダー、 スタック順序の再構築(reconfigure)を試みる。 X サーバーは、異なるクライアントが XConfigureWindow(), XLowerWindow(), XRaiseWindow(), XMapRaised(), XMoveResizeWindow(), XMoveWindow(), XResizeWindow(), XRestackWindows(), XSetWindowBorderWidth() を呼び、 ウインドウ上でウインドウ再構築リクエストを起こす時には、 必ずこのイベントが発生する。

To receive ConfigureRequest events, set the SubstructureRedirectMask bit in the event-mask attribute of the window. ConfigureRequest events are generated when a ConfigureWindow protocol request is issued on a child window by another client. For example, suppose a client application calls XLowerWindow() to lower a window. If you 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 ConfigureRequest event to you and does not lower the specified window.
ConfigureRequest イベントを受け取るには ウインドウの イベントマスク 属性の SubstructureRedirectMask ビットを設定する。 ConfigureRequest イベントは他のクライアントから子ウインドウに対して ConfigureWindow プロトコルリクエストが出された時に発生する。 例えば、 クライアントアプリケーションがウインドウを下げる XLowerWindow() を呼ぶことを想定しよう。 親ウィンドウで SubstructureRedirectMask を選択し、 更にそのウインドウの override-redirect 属性に False が設定されていれば、 X サーバーは ConfigureRequest イベントを通知し、 指定されたウインドウのスタック順序は下げない。

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



typedef struct {
	int type;		/* ConfigureRequest */
	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;
	int x, y;
	int width, height;
	int border_width;
	Window above;
	int detail;		/* Above, Below, TopIf, BottomIf, Opposite */
	unsigned long value_mask;
} XConfigureRequestEvent;

The parent member is set to the parent window. The window member is set to the window whose size, position, border width, and/or stacking order is to be reconfigured. The value_mask member indicates which components were specified in the ConfigureWindow protocol request. The corresponding values are reported as given in the request. The remaining values are filled in from the current geometry of the window, except in the case of above (sibling) and detail (stack-mode), which are reported as None and Above, respectively, if they are not given in the request.
parent メンバーには親ウインドウが設定される。 window メンバーにはサイズ、位置、ボーダー幅、スタック順序が再構築(reconfigure) されるウインドウが設定される。 value_mask メンバーは ConfigureWindow プロトコルリクエストにおいて指定されているコンポーネントを示している。 リクエストにおいて与えられていなければ、 None および Above として通知される above (sibling)メンバーと detail (stack_mode)メンバーを除き、 現在のウインドウのジオメトリ(geometry)より与えられる。

Next: MapRequest Events

Christophe Tronche, ch.tronche@computer.org