Xlib offers a series of functions which return specific events, like XIfEvent()
, XMaskEvent()
, XWindowEvent()
, XCheckTypedEvent()
(and their "Check" versions) ...
How about for XCB? Is there any way to get only specific events in the event queue?
xcb_wait_for_special_event()
seems to be one of such functions, but there is no detailed manual, so I don't know how to use it.
I tried to read source codes of xlib and xcb, but it was beyond my capacity.
With libxcb, there is no "fancy event queue management". You'll have to call xcb_poll_for_event()
in a loop yourself and put events in your own event queue. Then you can handle events in that queue in whatever order you want, prioritising some events, if you want.