next up previous contents
Next: Avoiding multiple Exposure Up: Programming Tips Previous: Programming Tips

Catching Exposure Events

If a window is obscured and then subsequently uncovered it is the clients responsibility to do any repainting which may be needed. X merely sends the correct event type and then leaves it to the application to decide what to do about it. The usual solution is to have a subroutine for redrawing the window which is called whenever the expose events are delivered.

No drawing happens until the first expose event arrives. Ensure that all windows receiving events appear on screen after events have been selected but before events happen. Otherwise the first expose event might be missed.

Tim Love
Mon Mar 11 17:03:18 GMT 1996