mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 22:20:24 +00:00
gdk/wayland: Ensure .leave events with active buttons breaks grabs
Instead of silently ending up the grab, make it sure that we emit a GDK_GRAB_BROKEN event if needed.
This commit is contained in:
parent
2bd8124b5d
commit
f7d2985f89
@ -706,7 +706,6 @@ device_maybe_emit_ungrab_crossing (GdkDevice *device,
|
||||
|
||||
if (grab)
|
||||
{
|
||||
grab->serial_end = grab->serial_start;
|
||||
prev_focus = grab->surface;
|
||||
surface = grab->surface;
|
||||
}
|
||||
@ -1541,6 +1540,19 @@ pointer_handle_leave (void *data,
|
||||
|
||||
_gdk_wayland_display_update_serial (display_wayland, serial);
|
||||
|
||||
if (seat->pointer_info.button_modifiers != 0)
|
||||
{
|
||||
gulong display_serial;
|
||||
|
||||
display_serial = _gdk_display_get_next_serial (seat->display);
|
||||
_gdk_display_end_device_grab (seat->display, seat->master_pointer,
|
||||
display_serial, NULL, TRUE);
|
||||
_gdk_display_device_grab_update (seat->display,
|
||||
seat->master_pointer,
|
||||
seat->pointer,
|
||||
display_serial);
|
||||
}
|
||||
|
||||
event = gdk_crossing_event_new (GDK_LEAVE_NOTIFY,
|
||||
seat->pointer_info.focus,
|
||||
seat->master_pointer,
|
||||
|
Loading…
Reference in New Issue
Block a user