[gtk/wip/carlosg/use-press-serial: 1/3] gdk/wayland: Use last implicit grab serial for DnD start requests




commit eb0b98d5f2ac551c847981e893b7f2f0ac8cf612
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Jul 18 12:37:29 2022 +0200

    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

 gdk/wayland/gdkdrag-wayland.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]