This function is similar to .PN XWindowEvent except that it never blocks and it returns a .PN Bool indicating if the event was returned.
Bool XCheckWindowEvent(display, w, event_mask, event_return)
      Display *display;
      Window w;
      long event_mask;
      XEvent *event_return;


display Specifies the connection to the X server.
w Specifies the window whose events you are interested in.
event_mask Specifies the event mask.
event_return Returns the matched event's associated structure.


The XCheckWindowEvent() function searches the event queue and then the events available on the server connection for the first event that matches the specified window and event mask. If it finds a match, XCheckWindowEvent() removes that event, copies it into the specified XEvent structure, and returns True . The other events stored in the queue are not discarded. If the event you requested is not available, XCheckWindowEvent() returns False , and the output buffer will have been flushed.

See also

XCheckMaskEvent(), XCheckTypedEvent(), XCheckTypedWindowEvent(), XIfEvent(), XMaskEvent(), XNextEvent(), XPeekEvent(), XPutBackEvent(), XSendEvent(), XWindowEvent(), "Selecting Events Using a Window or Event Mask".
Christophe Tronche, ch@tronche.com