Reference

XPeekIfEvent(3) on Linux

The text 5ecbea51c16c, as Debian 13 (Trixie) shipped it.

check the event queue with a predicate procedure

XPeekIfEvent(3) on Linux now