Reference

XPeekIfEvent(3) on Linux

The text 5931b31fcd55, as Debian 7 (Wheezy) shipped it.

check the event queue with a predicate procedure

XPeekIfEvent(3) on Linux now