Reference

XWindowEvent(3) on Linux

The text 4eaa8bc91206, as Debian 7 (Wheezy) shipped it.

select events by type

XWindowEvent(3) on Linux now