Next: Coping with Exposures
Up: Programming Tips
Previous: Catching Exposure Events
You don't want to redraw the window more than is necessary. If a window
receives 2 expose events and nothing happens in between, the window
needn't be drawn twice. Strategies are
- Ignore all Expose events whose count field isn't zero.
- Since all expose events generated by a single user action are guarenteed
to be contiguous in the queue, you can discard all but the first.
If you want to remove all expose events relating to a certain window, use
XEvent event;
...
case Expose:
/* deal with event */
while XCheckTypedWindowEvent(display,window,Expose,&event)
;
Tim Love
Mon Mar 11 17:03:18 GMT 1996