XALLOWDEVICEEVENTS(3)
π XALLOWDEVICEEVENTS π
okay bestie, welcome to XALLOWDEVICEEVENTS(3) β yes, section 3, we're in library-call territory, and this one is literally about releasing queued events. Let's go π
πΈ NAME πΈ
XAllowDeviceEvents β release queued events π
β¨ SYNOPSIS β¨
#include <X11/extensions/XInput.h>
int XAllowDeviceEvents( Display *display,
XDevice *device,
int event_mode,
Time time);
here's the cast of characters, one by one π«Ά
displayβ the connection to the X server. your lil link to the mothership πdeviceβ the device whose events are gonna be allowed through. pick your fave π¦event_modeβ the event mode, obvs. you can passAsyncThisDevice,SyncThisDevice,ReplayThisDevice,AsyncOtherDevices,SyncAll, orAsyncAllβ¨timeβ the time. you can pass either a timestamp orCurrentTimeβ°
π DESCRIPTION π
so XAllowDeviceEvents releases some queued events if the client has caused a device to freeze. it's giving "un-pause me, i'm ready" π§β‘οΈπ₯
and just so we're clear: it has no effect if the specified time is earlier than the last-grab time of the most recent active grab for the client and device, or if the specified time is later than the current X server time. the vibes must line up β³
now here's the tea on what actually happens, depending on which constant you hand to the event_mode argument π
AsyncThisDeviceβ if the specified device is frozen by the client, event processing for that device continues as usual. if the device is frozen multiple times by the client on behalf of multiple separate grabs,AsyncThisDevicethaws for all. andAsyncThisDevicehas no effect if the specified device is not frozen by the client β but plot twist, the device doesn't need to be grabbed by the client πSyncThisDeviceβ if the specified device is frozen and actively grabbed by the client, event processing for that device continues normally until the next key or button event is reported to the client. at that point, the specified device again appears to freeze. however!! if the reported event causes the grab to be released, the specified device does not freeze.SyncThisDevicehas no effect if the specified device is not frozen by the client or is not grabbed by the client πReplayThisDeviceβ if the specified device 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 aGrabDeviceButtonor from a previousAllowDeviceEventswith modeSyncThisDevice, but not from aGrabDevice), the grab is released and that event is completely reprocessed. this time, however, the request ignores any passive grabs at or above (toward the root) that the grab-window of the grab just released. the request has no effect if the specified device is not grabbed by the client or if it is not frozen as the result of an event πAsyncOtherDevicesβ if the remaining devices are frozen by the client, event processing for them continues as usual. if the other devices are frozen multiple times by the client on behalf of multiple grabs,AsyncOtherDevices"thaws" for all.AsyncOtherDeviceshas no effect if the devices are not frozen by the client πSyncAllβ if all devices are frozen by the client, event processing (for all devices) continues normally until the next button or key event is reported to the client for a grabbed device, at which time all devices again appear to freeze. however, if the reported event causes the grab to be released, then the devices do not freeze. if any device is still grabbed, then a subsequent event for it will still cause all devices to freeze.SyncAllhas no effect unless all devices are frozen by the client. if any device is frozen twice by the client on behalf of two separate grabs,SyncAllthaws for both. a subsequent freeze forSyncAllwill only freeze each device once πAsyncAllβ if all devices are frozen by the client, event processing for all devices continues normally. if any device is frozen multiple times by the client on behalf of multiple separate grabs,AsyncAllthaws for all.AsyncAllhas no effect unless all devices are frozen by the client π
okay and here's the cross-device lore, because it matters:
AsyncThisDevice, SyncThisDevice, and ReplayThisDevice have no effect on the processing of events from the remaining devices. AsyncOtherDevices has no effect on the processing of events from the specified device. and when the event_mode is SyncAll or AsyncAll, the device parameter is ignored β literally just vibes at that point π«₯
it is possible for several grabs of different devices by the same or different clients to be active simultaneously. if a device is frozen on behalf of any grab, no event processing is performed for the device. it is possible for a single device to be frozen because of several grabs. in this case, the freeze must be released on behalf of each grab before events can again be processed. so yeah, unfreeze responsibly π§
lastly: XAllowDeviceEvents can generate a BadDevice or BadValue error π
π©Ί DIAGNOSTICS π©Ί
BadDeviceβ an invalid device was specified. the specified device does not exist or has not been opened by this client viaXOpenInputDevice. this error may also occur if the specified device is the X keyboard or X pointer device πBadValueβ an invalid mode was specified on the request. wrong constant bestie, try again π
π SEE ALSO π
and that's the whole page, no notes π
this was XALLOWDEVICEEVENTS(3), from the 05/18/2026 release β go forth and release those queued events, bestie, you ate πβ¨π¦π
π¦ where this page comes from
- fedora 44: libXi-devel 1.8.3-1.fc44 Β· MIT-open-group AND SMLNJ AND MIT
- fedora 44: libXi-devel 1.8.3-1.fc44 Β· MIT-open-group AND SMLNJ AND MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms