NAME
XPeekEvent — get an event without removing it from the queue.
SYNOPSIS
XPeekEvent(display, event_return) Display ∗display; XEvent ∗event_return;
ARGUMENTS
displaySpecifies a connection to an X server; returned from XOpenDisplay().
report_return
Returns the event peeked from the input queue.
DESCRIPTION
XPeekEvent() peeks at an input event from the head of the event queue and copies it into an XEvent supplied by the caller, without removing it from the input queue. If the queue is empty, XPeekEvent() flushes the request buffer and waits (blocks) until an event is received. If you do not want to wait, use the QLength() macro or XQLength() to determine if there are any events to peek at, or use XCheckIfEvent(). XEventsQueued() can perform the equivalent of either QLength() or XPending() and more.
For more information, see Volume One, Chapter 8, Events.
SEE ALSO
XQLength(), XAllowEvents(), XCheckIfEvent(), XCheckMaskEvent(), XCheckTypedEvent(), XCheckTypedWindowEvent(), XCheckWindowEvent(), XEventsQueued(), XGetInputFocus(), XGetMotionEvents(), XIfEvent(), XMaskEvent(), XNextEvent(), XPeekIfEvent(), XPending(), XPutBackEvent(), XSelectInput(), XSendEvent(), XSetInputFocus(), XSynchronize(), XWindowEvent().
Xlib Reference Manual