From: Po Lu Date: Sun, 3 Apr 2022 05:32:25 +0000 (+0800) Subject: Look for DND proxies on the root window as well X-Git-Tag: emacs-29.0.90~1931^2~805 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=35928918d1406e61a982e7a036cc6c441484b4cc;p=emacs.git Look for DND proxies on the root window as well * src/xterm.c (x_dnd_get_target_window): If nothing was found on the COW, look at the root window. --- diff --git a/src/xterm.c b/src/xterm.c index 8a7a49c8837..e7c671de744 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -2653,8 +2653,23 @@ x_dnd_get_target_window (struct x_display_info *dpyinfo, } #endif - /* No toplevel was found and the overlay window was not a proxy, - so return None. */ + /* Now look for an XdndProxy on the root window. */ + + proxy = x_dnd_get_window_proxy (dpyinfo, dpyinfo->root_window); + + if (proxy != None) + { + proto = x_dnd_get_window_proto (dpyinfo, dpyinfo->root_window); + + if (proto != -1) + { + *proto_out = proto; + return proxy; + } + } + + /* No toplevel was found and the overlay and root windows were + not proxies, so return None. */ *proto_out = -1; return None; }