xcb_allow_events(3)
π xcb_allow_events β release queued events
okay bestie, welcome to the XCB Requests corner of the manual, page xcb_allow_events(3) π¦. this one's all about un-freezing stuff, and honestly? it's giving "let my people go" but for input devices. let's get into it π
β¨ SYNOPSIS β¨
#include <xcb/xproto.h>
π Request function
xcb_void_cookie_t xcb_allow_events(xcb_connection_t *conn, uint8_t mode,
xcb_timestamp_t time);
πΈ REQUEST ARGUMENTS πΈ
connβ your XCB connection to X11. the whole reason we're here, no cap π«modeβ literally the main character of this function. it's one of these values:XCB_ALLOW_ASYNC_POINTERβ for AsyncPointer: if the pointer is frozen by the client, pointer event processing just... continues normally again π«Ά. and if the pointer got frozen twice by the client on behalf of two separate grabs, AsyncPointer thaws for both. oh and β AsyncPointer has no effect if the pointer is not frozen by the client, but the pointer does not need to be grabbed by the client for this to work. okay but the manpage itself says:
TODO: rewrite this in more understandable terms.
not me relaying the original's own to-do list to you π iconic honestly.
XCB_ALLOW_SYNC_POINTERβ for SyncPointer: if the pointer is frozen and actively grabbed by the client, pointer event processing continues normally until the nextButtonPressorButtonReleaseevent is reported to the client β at which point the pointer goes back to looking frozen πΆβπ«οΈ. BUT if the reported event causes the pointer grab to be released, then the pointer does not freeze. SyncPointer has no effect if the pointer isn't frozen by the client, or if the pointer isn't grabbed by the client. periodt.XCB_ALLOW_REPLAY_POINTERβ for ReplayPointer: if the pointer is actively grabbed by the client and is frozen as the result of an event having been sent to the client (either from the activation of aGrabButtonor from a previous AllowEvents with mode SyncPointer β but not from aGrabPointer), then the pointer grab is released and that event is completely reprocessed, this time ignoring any passive grabs at or above (towards the root) the grab-window of the grab just released π. the request has no effect if the pointer isn't grabbed by the client or if the pointer isn't frozen as the result of an event.XCB_ALLOW_ASYNC_KEYBOARDβ for AsyncKeyboard: if the keyboard is frozen by the client, keyboard event processing continues normally π. if the keyboard is frozen twice by the client on behalf of two separate grabs, AsyncKeyboard thaws for both. AsyncKeyboard has no effect if the keyboard isn't frozen by the client, but the keyboard need not be grabbed by the client.XCB_ALLOW_SYNC_KEYBOARDβ for SyncKeyboard: if the keyboard is frozen and actively grabbed by the client, keyboard event processing continues normally until the nextKeyPressorKeyReleaseevent is reported to the client, at which time the keyboard again appears to freeze π₯Ά. however, if the reported event causes the keyboard grab to be released, then the keyboard does not freeze. SyncKeyboard has no effect if the keyboard isn't frozen by the client or if the keyboard isn't grabbed by the client.XCB_ALLOW_REPLAY_KEYBOARDβ for ReplayKeyboard: if the keyboard is actively grabbed by the client and is frozen as the result of an event having been sent to the client (either from the activation of aGrabKeyor from a previous AllowEvents with mode SyncKeyboard β but not from aGrabKeyboard), then the keyboard grab is released and that event is completely reprocessed, this time ignoring any passive grabs at or above (towards the root) the grab-window of the grab just released π. the request has no effect if the keyboard isn't grabbed by the client or if the keyboard isn't frozen as the result of an event.XCB_ALLOW_ASYNC_BOTHβ for AsyncBoth: if the pointer and the keyboard are frozen by the client, event processing for both devices continues normally β¨. if a device is frozen twice by the client on behalf of two separate grabs, AsyncBoth thaws for both. AsyncBoth has no effect unless both pointer and keyboard are frozen by the client. both or nothing, babe πXCB_ALLOW_SYNC_BOTHβ for SyncBoth: if both pointer and keyboard are frozen by the client, event processing (for both devices) continues normally until the nextButtonPress,ButtonRelease,KeyPress, orKeyReleaseevent is reported to the client for a grabbed device (button event for the pointer, key event for the keyboard), at which time the devices again appear to freeze βοΈ. however, if the reported event causes the grab to be released, then the devices do not freeze β but if the other device is still grabbed, then a subsequent event for it will still cause both devices to freeze. SyncBoth has no effect unless both pointer and keyboard are frozen by the client. if the pointer or keyboard is frozen twice by the client on behalf of two separate grabs, SyncBoth thaws for both (but a subsequent freeze for SyncBoth will only freeze each device once). very demure, very mindful π
timeβ a timestamp, and it's there to avoid race conditions when you're running X over the network π.
the special value XCB_CURRENT_TIME will be replaced with the current server time. chef's kiss, no notes β¨
π¦ DESCRIPTION π¦
Releases queued events if the client has caused a device (pointer/keyboard) to freeze due to grabbing it actively. that's the whole vibe, bestie π«Ά
heads up: this request has no effect iftimeis earlier than the last-grab time of the most recent active grab for this client, or iftimeis later than the current X server time. so don't come in with a stale timestamp and expect magic, okay? π
π₯ RETURN VALUE π₯
Returns an xcb_void_cookie_t π. errors (if any) have to be handled in the event loop, so stay on your toes.
if you'd rather handle errors directly with xcb_request_check instead, use xcb_allow_events_checked π. see xcb-requests(3) for the details.
π ERRORS π
xcb_value_error_tβ you specified an invalidmode. not me catching a bad mode π¨ like, be serious.
π SEE ALSO π
π AUTHOR π
Generated from xproto.xml. contact xcb@lists.freedesktop.org for corrections and improvements. they're literally so responsive, iykyk π
and that's the page, bestie!! this whole thing lives in X Version 11, libxcb 1.17.0 β mwah, slay, go thaw some pointers π§ββοΈβ¨π
π¦ where this page comes from
- alpine 3.22: libxcb-doc 1.17.0-r0 Β· MIT
- alpine 3.23: libxcb-doc 1.17.0-r1 Β· MIT
- alpine 3.24: libxcb-doc 1.17.0-r2 Β· MIT
- arch rolling: libxcb 1.17.0-1 Β· X11
- centos-stream 10: libxcb-devel 1.17.0-3.el10 Β· X11
- debian trixie: libxcb-doc 1.17.0-2
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- nixpkgs unstable: libxcb 1.17.0
- opensuse-leap 16.0: libxcb-devel-doc 1.17.0-160000.2.2 Β· MIT
- ubuntu questing: libxcb-doc 1.17.0-2build1
- ubuntu resolute: libxcb-doc 1.17.0-2ubuntu1
- ubuntu stonking: libxcb-doc 1.17.0-2ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms