Compare commits

...

1 Commits

Author SHA1 Message Date
Christian Hergert
df451ca352 gdk/wayland: ignore leave event unless it is for grab
This is another way to work around GNOME/mutter#3546 which is inconsistent
with event delivery from Weston. Given that other compositors may mess this
up perhaps being more defensive on the GDK side is prudent.

Essentially we just ignore a leave event if it has come in for a surface
and we have an explicit grab on another surface. That can happen if we get
a LEAVE event right before getting an ENTER for the grab surface.

Fixes: #6622
2024-06-26 17:38:32 -07:00

View File

@@ -704,13 +704,24 @@ pointer_handle_leave (void *data,
GdkWaylandSeat *seat = data;
GdkEvent *event;
GdkDeviceGrabInfo *grab;
GdkSurface *gdk_surface;
if (!seat->pointer_info.focus)
return;
if (surface == NULL)
return;
gdk_surface = GDK_SURFACE (wl_surface_get_user_data (surface));
grab = _gdk_display_get_last_device_grab (seat->display,
seat->logical_pointer);
if (grab &&
!grab->implicit &&
gdk_surface != grab->surface)
return;
if (seat->pointer_info.button_modifiers != 0 &&
grab && grab->implicit)
{