I am a newbie to X11 development, so I may have gotten this wrong...
It seems xgb.Conn doesn't have out-of-order retrieval of events buffered in the event channel. X11 xlib has functions like XCheckMaskEvent and XCheckWindowEvent that seem to allow you to pick certain events out of order from the event queue. How do I implement this behavior using xgb.Conn?
To be specific, this functionality seems to be useful when implementing drag-window with mouse feature. For example, dwm window manager from suckless project uses these functions for moving and resizing windows with mouse. See https://github.com/LukeSmithxyz/dwm/blob/master/dwm.c#L1420
This is a low level library for communication with X11. Something like xcb, but in golang. For event queue manipulation it is advised to use higher level library, like xgbuitl. Maybe there is something similar to what are you looking for.
I am a newbie to X11 development, so I may have gotten this wrong...
It seems
xgb.Conn
doesn't have out-of-order retrieval of events buffered in the event channel. X11 xlib has functions likeXCheckMaskEvent
andXCheckWindowEvent
that seem to allow you to pick certain events out of order from the event queue. How do I implement this behavior usingxgb.Conn
?To be specific, this functionality seems to be useful when implementing drag-window with mouse feature. For example,
dwm
window manager from suckless project uses these functions for moving and resizing windows with mouse. See https://github.com/LukeSmithxyz/dwm/blob/master/dwm.c#L1420