]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/xterm.c (x_dnd_get_target_window): Look at root window proxies too.
authorPo Lu <luangruo@yahoo.com>
Sun, 3 Apr 2022 23:25:27 +0000 (07:25 +0800)
committerPo Lu <luangruo@yahoo.com>
Sun, 3 Apr 2022 23:25:27 +0000 (07:25 +0800)
src/xterm.c

index aef3d2d840f983612a1ec11e105aa7c6f69be8f9..e3935bacb9af5df398cb4201814ae9d7f1f4799b 100644 (file)
@@ -2745,6 +2745,22 @@ x_dnd_get_target_window (struct x_display_info *dpyinfo,
   if (child != dpyinfo->root_window)
     {
 #endif
+      if (child != None)
+       {
+         proxy = x_dnd_get_window_proxy (dpyinfo, child);
+
+         if (proxy)
+           {
+             proto = x_dnd_get_window_proto (dpyinfo, proxy);
+
+             if (proto != -1)
+               {
+                 *proto_out = proto;
+                 return proxy;
+               }
+           }
+       }
+
       *proto_out = x_dnd_get_window_proto (dpyinfo, child);
       return child;
 #if defined HAVE_XCOMPOSITE && (XCOMPOSITE_MAJOR > 0 || XCOMPOSITE_MINOR > 2)
@@ -2788,6 +2804,22 @@ x_dnd_get_target_window (struct x_display_info *dpyinfo,
        }
     }
 
+  if (child != None)
+    {
+      proxy = x_dnd_get_window_proxy (dpyinfo, child);
+
+      if (proxy)
+       {
+         proto = x_dnd_get_window_proto (dpyinfo, proxy);
+
+         if (proto != -1)
+           {
+             *proto_out = proto;
+             return proxy;
+           }
+       }
+    }
+
   *proto_out = x_dnd_get_window_proto (dpyinfo, child);
   return child;
 #endif