Reference

XCheckTypedWindowEvent(3) on Linux

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

select events by type

XCheckTypedWindowEvent(3) on Linux now