Reference

XPeekIfEvent(3) on Linux

The text 21a1f7b44e41, as Debian 6.0 (Squeeze) shipped it.

check the event queue with a predicate procedure

XPeekIfEvent(3) on Linux now