[gtk/wip/otte/win32-cleanup] x11: Remove unused code



commit 72a6ab43f62038e256689ce890a8af43315d37e3
Author: Benjamin Otte <otte redhat com>
Date:   Wed Jul 28 03:44:50 2021 +0200

    x11: Remove unused code
    
    We register all our surfaces for DND, so no need to check anymore.
    
    Also, the root window has no attached GdkSurface.

 gdk/x11/gdkdrag-x11.c | 22 ++++------------------
 1 file changed, 4 insertions(+), 18 deletions(-)
---
diff --git a/gdk/x11/gdkdrag-x11.c b/gdk/x11/gdkdrag-x11.c
index f4b752306e..b55f513428 100644
--- a/gdk/x11/gdkdrag-x11.c
+++ b/gdk/x11/gdkdrag-x11.c
@@ -1281,19 +1281,10 @@ _gdk_x11_display_get_drag_protocol (GdkDisplay      *display,
   surface = gdk_x11_surface_lookup_for_display (display, xid);
   if (surface)
     {
-      if (g_object_get_data (G_OBJECT (surface), "gdk-dnd-registered") != NULL)
-        {
-          *protocol = GDK_DRAG_PROTO_XDND;
-          *version = 5;
-          GDK_DISPLAY_NOTE (display, DND, g_message ("Entering local Xdnd window %#x\n", (guint) xid));
-          return xid;
-        }
-      else if (_gdk_x11_display_is_root_window (display, xid))
-        {
-          *protocol = GDK_DRAG_PROTO_ROOTWIN;
-          GDK_DISPLAY_NOTE (display, DND, g_message ("Entering root window\n"));
-          return xid;
-        }
+      *protocol = GDK_DRAG_PROTO_XDND;
+      *version = 5;
+      GDK_DISPLAY_NOTE (display, DND, g_message ("Entering local Xdnd window %#x\n", (guint) xid));
+      return xid;
     }
   else if ((retval = xdnd_check_dest (display, xid, version)))
     {
@@ -1573,11 +1564,6 @@ _gdk_x11_surface_register_dnd (GdkSurface *surface)
 
   g_return_if_fail (surface != NULL);
 
-  if (g_object_get_data (G_OBJECT (surface), "gdk-dnd-registered") != NULL)
-    return;
-  else
-    g_object_set_data (G_OBJECT (surface), "gdk-dnd-registered", GINT_TO_POINTER (TRUE));
-
   /* Set XdndAware */
 
   /* The property needs to be of type XA_ATOM, not XA_INTEGER. Blech */


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