Package: gdk
Function gdk-seat-grab
Lambda Listgdk-seat-grab (seat window capabilities owner-events cursor event func) ArgumentsReturn ValueThe value :success of type gdk-grab-status if the grab was successful. Details
Grabs the seat so that all events corresponding to the given capabilities
are passed to this application until the seat is ungrabbed with the function gdk-seat-ungrab, or the window becomes hidden.
This overrides any previous grab on the seat by this client. As a rule of thumb, if a grab is desired over :pointer, all other "pointing" capabilities, e.g. :touch, should be grabbed too, so the user is able to interact with all of those while the grab holds, you should thus use :all-pointing most commonly. Grabs are used for operations which need complete control over the events corresponding to the given capabilities. For example in GTK this is used for drag and drop operations, popup menus and such. Note that if the event mask of a gdk-window object has selected both button press and button release events, or touch begin and touch end, then a press event will cause an automatic grab until the button is released, equivalent to a grab on the window with owner-events set to true. This is done because most applications expect to receive paired press and release events. 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. Since 3.20 | See also |
2020-11-4