Previous: , Up: Drawables   [Contents][Index]


3.3 Window Properties and Visibility

Function: x:get-window-property window property

Returns the (string or list of numbers) value of property of window.

Function: x:get-window-property window property #t

Removes and returns the (string or list of numbers) value of property of window.

Function: x:list-properties window

Returns a list of the properties (strings) defined for window.

In X parlance, a window which is hidden even when not obscured by other windows is unmapped; one which shows is mapped. It is an unfortunate name-collision with Scheme, and is ingrained in the attribute names.

Function: x:map-window window

Maps the window and all of its subwindows that have had map requests. Mapping a window that has an unmapped ancestor does not display the window but marks it as eligible for display when the ancestor becomes mapped. Such a window is called unviewable. When all its ancestors are mapped, the window becomes viewable and will be visible on the screen if it is not obscured by another window. This function has no effect if the window is already mapped.

If the override-redirect of the window is False and if some other client has selected x:Substructure-Redirect-Mask on the parent window, then the X server generates a MapRequest event, and the x:map-window function does not map the window. Otherwise, the window is mapped, and the X server generates a MapNotify event.

If the window becomes viewable and no earlier contents for it are remembered, the X server tiles the window with its background. If the window’s background is undefined, the existing screen contents are not altered, and the X server generates zero or more x:Expose events. If backing-store was maintained while the window was unmapped, no x:Expose events are generated. If backing-store will now be maintained, a full-window exposure is always generated. Otherwise, only visible regions may be reported. Similar tiling and exposure take place for any newly viewable inferiors.

If the window is an Input-Output window, x:map-window generates x:Expose events on each Input-Output window that it causes to be displayed. If the client maps and paints the window and if the client begins processing events, the window is painted twice. To avoid this, first ask for x:Expose events and then map the window, so the client processes input events as usual. The event list will include x:Expose for each window that has appeared on the screen. The client’s normal response to an x:Expose event should be to repaint the window. This method usually leads to simpler programs and to proper interaction with window managers.

Function: x:map-subwindows window

Maps all subwindows of a specified window in top-to-bottom stacking order. The X server generates x:Expose events on each newly displayed window. This may be much more efficient than mapping many windows one at a time because the server needs to perform much of the work only once, for all of the windows, rather than for each window.

Function: x:unmap-window window

Unmaps the specified window and causes the X server to generate an UnmapNotify event. If the specified window is already unmapped, x:unmap-window has no effect. Normal exposure processing on formerly obscured windows is performed. Any child window will no longer be visible until another map call is made on the parent. In other words, the subwindows are still mapped but are not visible until the parent is mapped. Unmapping a window will generate x:Expose events on windows that were formerly obscured by it.

Function: x:unmap-subwindows window

Unmaps all subwindows for the specified window in bottom-to-top stacking order. It causes the X server to generate an UnmapNotify event on each subwindow and x:Expose events on formerly obscured windows. Using this function is much more efficient than unmapping multiple windows one at a time because the server needs to perform much of the work only once, for all of the windows, rather than for each window.


Previous: Window Attributes, Up: Drawables   [Contents][Index]