All the windows in X are arranged in a strict hierarchy. At the top of the hierarchy are the root windows, which cover the display screens. Each root window is partially or completely covered by its child windows. All windows, except for root windows, have parents. Child windows can have their own children. In this way, a tree of arbitrary depth on each screen can be created. CLX provides several functions for examining and modifying the window hierarchy.
drawable-root | drawable | Function |
Returns the root window of the specified drawable.
|
query-tree | window &key ( :result-type `list) | Function |
Returns the children windows, the parent window, and the root window for the specified window. The children are returned as a sequence of windows in current stacking order, from bottom-most (first) to top-most (last). The :result-type specifies the type of children sequence returned. |
reparent-window | window parent x y | Function |
Changes a window's parent within a single screen. There is no way to move a window between screens. The specified window is reparented by inserting it as a child of the specified parent. If the window is mapped, an unmap-window operation is automatically performed on the specified window. The window is then removed from its current position in the hierarchy and inserted as the child of the specified parent. The window is placed on top in the stacking order with respect to sibling windows. After reparenting the specified window, a :reparent-notify event is generated. The override-redirect attribute of the window is passed on in this event. Window manager clients normally should ignore this event if this attribute is :on. See Section 12, Events and Input, for more information on :reparent-notify event processing. Finally, if the specified window was originally mapped, a map-window operation is automatically performed on it. The X server performs normal exposure processing on formerly obscured windows. It might not generate :exposure events for regions from the initial unmap-window operation if they are immediately obscured by the final map-window operation. It is an error if any of the following are true:
|
translate-coordinates | source source-x source-y destination | Function |
Returns the position defined by source-x and source-y (relative to the origin of the source window), expressed as coordinates relative to the origin of the destination window. |