CLX provides the grab-button and ungrab-button functions for passively grabbing and releasing pointer control.
grab-button | window button event-mask &key (:modifiers 0) :owner-p :sync-pointer-p :sync-keyboard-p :confine-to :cursor | Function |
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:
then:
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. |
ungrab-button | window button &key (:modifiers 0) | Function |
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. |