wayland: Create drag surface directly
authorBenjamin Otte <otte@redhat.com>
Fri, 21 Apr 2023 19:44:55 +0000 (21:44 +0200)
committerBenjamin Otte <otte@redhat.com>
Wed, 26 Apr 2023 19:03:34 +0000 (21:03 +0200)
... instead of going through create_surface().

gdk/wayland/gdkdrag-wayland.c

index dd3ea0de8b0c2210346fa80a6ae76a5c241e8fa5..d323ba6e388055e313a6922c4f9e302eadbfede9 100644 (file)
@@ -24,6 +24,7 @@
 #include "gdkdisplay-wayland.h"
 #include <glib/gi18n-lib.h>
 #include "gdkseat-wayland.h"
+#include "gdksurface-wayland-private.h"
 
 #include "gdkdeviceprivate.h"
 
@@ -381,7 +382,9 @@ _gdk_wayland_surface_drag_begin (GdkSurface         *surface,
 
   drag = GDK_DRAG (drag_wayland);
 
-  drag_wayland->dnd_surface = gdk_wayland_display_create_surface (display, GDK_SURFACE_DRAG, NULL);
+  drag_wayland->dnd_surface = g_object_new (GDK_TYPE_WAYLAND_DRAG_SURFACE,
+                                            "display", display,
+                                            NULL);
 
   gdk_wayland_drag_create_data_source (drag);