Package: gdk
Function gdk-device-grab
Lambda Listgdk-device-grab (device window grab-ownership owner-events event-mask cursor time) ArgumentsReturn Value:sucess if the grab was successful. Details
Grabs the device so that all events coming from this device are passed to
this application until the device is ungrabbed with the gdk-device-ungrab function, or the window becomes unviewable.
This overrides any previous grab on the device by this client. Device grabs are used for operations which need complete control over the given device events, either pointer or keyboard. For example in GTK this is used for drag and drop operations, popup menus and such. Note that if the event mask of an X window has selected both button press and button release events, then a button press event will cause an automatic pointer grab until the button is released. X does this automatically since most applications expect to receive button press and release events in pairs. It is equivalent to a pointer grab on the window with owner-events set to true. If you set up anything at the time you take the grab that needs to be cleaned up when the grab ends, you should handle the gdk-event-grab-broken events that are emitted when the grab ends unvoluntarily. | See also |
2021-12-13