Next Prev Up

12.12.4 Exposure Events

The X server cannot guarantee that a window's content is preserved when the window is obscured or reconfigured. X requires client applications to be capable of restoring the contents of a previously-invisible window region whenever it is exposed. Therefore, the X server sends events describing the exposed window and its exposed region. For a simple window, a client can choose to redraw the entire content whenever any region is exposed. For a complex window, a client can redraw only the exposed region.


:exposure Event Type
     
Selected by:
:exposure .

An :exposure event is sent when redisplay is needed for a window region whose content has been lost. Redisplay is needed when one of the following occurs:

  • A region is exposed for a window and the X server has no backing store for the region
  • A region of a viewable window is obscured and the X server begins to honor the window's backing-store attribute of :always or :when-mapped
  • The X server begins to honor an unviewable window's backing-store attribute of :always or :when-mapped .

The regions needing redisplay are decomposed into an arbitrary set of rectangles, and an :exposure event is generated for each rectangle. For a given action causing :exposure events, the set of events for a given window are guaranteed to be reported contiguously.

:exposure events are never generated for :input-only windows.

All :exposure events caused by a hierarchy change are generated after any hierarchy event ( :unmap-notify, :map-notify, :configure-notify, :gravity-notify, or :circulate-notify) caused by that change. All :exposure events on a given window are generated after any :visibility-notify event on that window, but it is not required that all :exposure events on all windows be generated after all visibility events on all windows. The ordering of :exposure events with respect to :focus-out , :enter-notify, and :leave-notify events is not constrained.

window, event-window
Type window. The window needing redisplay.
x
Type card16. The position of the left edge of the region to redisplay, relative to the event-window.
y
Type card16. The position of the top edge of the region to redisplay, relative to the event-window.
width
Type card16. The width of the region to redisplay.
height
Type card16. The height of the region to redisplay.
count
Type card16. If count is zero, then no more :exposure events for this window follow. If count is nonzero, then at least that many more :exposure events for this window follow (and possibly more).

:graphics-exposure Event Type
     

A :graphics-exposure event is generated by a call to copy-area or copy-plane when the exposures attribute of the graphics context is :on. A :graphics-exposure event reports a destination region whose content cannot be computed because the content of the corresponding source region has been lost. For example, the missing source region may be obscured or may lie outside the current source drawable size. For a given action causing :graphics-exposure events, the set of events for a given destination are guaranteed to be reported contiguously.

drawable, event-window
Type drawable . The destination drawable for the copy-area or copy-plane function.
x
Type card16. The position of the left edge of the destination region, relative to the drawable.
y
Type card16. The position of the top edge of the destination region, relative to the drawable.
width
Type card16. The width of the destination region.
height
Type card16. The height of the destination region.
count
Type card16. If count is zero then no more :graphics-exposure events for the drawable follow. If count is nonzero then at least that many more :graphics-exposure events for the drawable follow (and possibly more).
major
Type card8. The major opcode for the graphics request generating the event (62 for copy-area, 63 for copy-plane).
minor
Type card16. The minor opcode for the graphics request generating the event (0 for both copy-area and copy-plane).

:no-exposure Event Type
     

A :no-exposure event is generated by a call to copy-area or copy-plane when the exposures attribute of the graphics context is :on. If no :graphics-exposure events are generated, then a single :no-exposure event is sent.

drawable, event-window
Type drawable . The destination drawable for the copy-area or copy-plane function.
major
Type card8. The major opcode for the graphics request generating the event (62 for copy-area, 63 for copy-plane).
minor
Type card16. The minor opcode for the graphics request generating the event (0 for both copy-area and copy-plane).

Next Prev Up
© 1988, 1989 Texas Instruments Incorporated
Conversion to HTML made by Gilbert Baumann.
Last build: Tue Dec 16 23:30:42 1997