Reference

XPeekIfEvent(3) on Linux

The text 357c338ed98b, as Debian 11 (Bullseye) shipped it.

check the event queue with a predicate procedure

XPeekIfEvent(3) on Linux now