CLX provides the grab-button and ungrab-button functions for passively grabbing and releasing pointer control.
The button (type card8) pressed or :any.
If true, all client windows receive pointer events normally.
Indicates whether the pointer is handled in a synchronous or asynchronous fashion.
Indicates whether the keyboard is in synchronous or asynchronous mode.
A window to which the pointer is confined.
This request establishes a passive grab. If the specified button is pressed when the specified modifier keys are down (and no other buttons or modifier keys are down), and:
The interpretation of the remaining arguments is the same as with grab-pointer. The active grab is terminated automatically when all buttons are released (independent of the state of modifier keys).
A zero modifier mask is equivalent to issuing the request for all possible modifier-key combinations (including the combination of no modifiers). It is not required that all specified modifiers have currently assigned keycodes. A button of :any is equivalent to issuing the request for all possible buttons. Otherwise, it is not required that the specified button currently be assigned to a physical button.
The button (type card8) that is released or :any.
Releases the passive button/key combination on the specified window if it was grabbed by this client. A zero modifier mask is equivalent to issuing the request for all possible modifier combinations including the combination of no modifiers. A button of :any is equivalent to issuing the request for all possible buttons. This has no effect on an active grab.