Reference

XtPending(3) on Linux

The text fc0fae329146, as Debian 4.0 (Etch) shipped it.

query and process events and input

XtPending(3) on Linux now