Reference

XPeekIfEvent(3) on Linux

The text 305997f4ed2d, as Debian 4.0 (Etch) shipped it.

check the event queue with a predicate procedure

XPeekIfEvent(3) on Linux now