From: Carlos Garnacho Date: Mon, 18 Jul 2022 10:37:29 +0000 (+0200) Subject: gdk/wayland: Use last implicit grab serial for DnD start requests X-Git-Tag: archive/raspbian/4.8.3+ds-2+rpi1~3^2~20^2~4^2~47^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=eb0b98d5f2ac551c847981e893b7f2f0ac8cf612;p=gtk4.git gdk/wayland: Use last implicit grab serial for DnD start requests This serial should be that from a button press/touch down/etc, use the last implicit grab here, which will presumably be from the same device that triggered the event. Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5048 --- diff --git a/gdk/wayland/gdkdrag-wayland.c b/gdk/wayland/gdkdrag-wayland.c index f017b8474f..b8566572d0 100644 --- a/gdk/wayland/gdkdrag-wayland.c +++ b/gdk/wayland/gdkdrag-wayland.c @@ -393,8 +393,8 @@ _gdk_wayland_surface_drag_begin (GdkSurface *surface, wl_data_device_start_drag (gdk_wayland_device_get_data_device (device), drag_wayland->data_source, gdk_wayland_surface_get_wl_surface (surface), - drag_wayland->dnd_wl_surface, - _gdk_wayland_display_get_serial (display_wayland)); + drag_wayland->dnd_wl_surface, + _gdk_wayland_seat_get_implicit_grab_serial (seat, NULL)); cursor = gdk_drag_get_cursor (drag, gdk_drag_get_selected_action (drag)); gdk_drag_set_cursor (drag, cursor);