IT lexicon › Programming › AllowEvents

AllowEvents

Programming På svenska → Updated: 2026-10-11

The X request that thaws a pointer or keyboard frozen by a synchronous grab — and which, in ReplayPointer mode, lets a click be delivered a second time as if nobody had intercepted it.

A grab in GrabModeSync freezes the device after the first event: the server queues everything that follows until the client makes up its mind and calls XAllowEvents. The modes are AsyncPointer (release the queue and stop freezing), SyncPointer (let one more event through, then freeze again) and ReplayPointer, plus keyboard equivalents and SyncBoth/AsyncBoth.

ReplayPointer is why click-to-focus works on X at all. The window manager puts a passive, synchronous grab on the mouse button over every client window. On a click it sees the event first, focuses and raises the window, then replays the click — now past its own grab, so the application receives it too. A window manager that forgets the call leaves the pointer frozen until the grab ends, which users experience as the entire screen locking up.

← Back to the lexicon