Reference

XPeekIfEvent(3) on Linux

The text adcdd377e1a4, as Debian 10 (Buster) shipped it.

check the event queue with a predicate procedure

XPeekIfEvent(3) on Linux now