Reference

XPeekIfEvent(3) on Linux

The text 731ee197118c, as Debian 12 (Bookworm) shipped it.

check the event queue with a predicate procedure

XPeekIfEvent(3) on Linux now