Next: , Previous: , Up: Windows and Pixmaps   [Contents][Index]


5.6 Mapping Windows

A window is considered mapped if a map-window call has been made on it. When windows are first created, they are not mapped because an application may wish to create a window long before it is mapped to the screen. A mapped window may not be visible on the screen for one of the following reasons:

A subwindow will appear on the screen as long as all of its ancestors are mapped and not obscured by a sibling or clipped by an ancestor. 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 remains visible on the screen if not obscured by any sibling or ancestor.

Any output to a window not visible on the screen is discarded. :exposure events are generated for the window when part or all of it becomes visible on the screen. A client only receives the :exposure events if it has selected them. Mapping or unmapping a window does not change its stacking order priority.

Function: map-window window
window

A window.

Maps the window. This function has no effect when the window is already mapped.

If the override-redirect attribute of the window is :off and another client has selected :substructure-redirect on the parent window, the X server generates a :map-request event and the map-window function does not map the window. Otherwise, the window is mapped, and the X server generates a :map-notify event.

If the window becomes visible and no earlier contents for it are remembered, map-window tiles the window with its background. If no background was defined for the window, the existing screen contents are not altered, and the X server generates one or more :exposure events. If a backing-store was maintained while the window was unmapped, no :exposure events are generated. If a 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.

map-window generates :exposure events on each :input-output window that it causes to become visible.

Function: map-subwindows window
window

A window.

Maps all child windows for a specified window in top-to-bottom stacking order. The X server generates an :exposure event on each newly visible window. This function is much more efficient than mapping each child individually.

Function: unmap-window window
window

A window.

Unmaps the specified window and causes the X server to generate an :unmap-notify event. If the specified window is already unmapped, unmap-window has no effect. Normal exposure processing on formerly obscured windows is performed. Any child window is no longer viewable. Unmapping the window generates :exposure events on windows that were formerly obscured by window and its children.

Function: unmap-subwindows window
window

A window.

Unmaps all child windows for the specified window in bottom to top stacking order. The X server generates an :unmap-notify event on each child and :exposure events on formerly obscured windows. Using this function is much more efficient than unmapping child windows individually.


Next: , Previous: , Up: Windows and Pixmaps   [Contents][Index]