gdk/wayland: Use last implicit grab serial for DnD start requests
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 18 Jul 2022 10:37:29 +0000 (12:37 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Mon, 18 Jul 2022 11:00:32 +0000 (13:00 +0200)
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
gdk/wayland/gdkdrag-wayland.c

index f017b8474f8d6e95de4e824d2266d836a5204b34..b8566572d00a1c0b74e091d9e6cf97224e4da5fd 100644 (file)
@@ -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);