Reference

XPeekIfEvent(3) on Linux

The text f59ddd22b65d, as Debian 8 (Jessie) shipped it.

check the event queue with a predicate procedure

XPeekIfEvent(3) on Linux now