next up previous contents
Next: Coping with Exposures Up: Programming Tips Previous: Catching Exposure Events

Avoiding multiple Exposure

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

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