Merge branch 'wip/carlosg/no-early-popup-ungrabs-4-2' into 'gtk-4-2'

gdk/wayland: Break only implicit grabs on wl_pointer.leave w/ pressed buttons (4.2)

See merge request GNOME/gtk!3640
This commit is contained in:
Matthias Clasen
2021-06-06 12:31:59 +00:00

View File

@@ -1518,6 +1518,7 @@ pointer_handle_leave (void *data,
GdkWaylandSeat *seat = data;
GdkEvent *event;
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (seat->display);
GdkDeviceGrabInfo *grab;
if (!surface)
return;
@@ -1529,8 +1530,11 @@ pointer_handle_leave (void *data,
return;
_gdk_wayland_display_update_serial (display_wayland, serial);
grab = _gdk_display_get_last_device_grab (seat->display,
seat->logical_pointer);
if (seat->pointer_info.button_modifiers != 0)
if (seat->pointer_info.button_modifiers != 0 &&
grab && grab->implicit)
{
gulong display_serial;