From: Po Lu Date: Sun, 3 Apr 2022 23:25:27 +0000 (+0800) Subject: * src/xterm.c (x_dnd_get_target_window): Look at root window proxies too. X-Git-Tag: emacs-29.0.90~1931^2~793 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9fab134ee8b4ed439a8944e0d7058b1898c9bc0b;p=emacs.git * src/xterm.c (x_dnd_get_target_window): Look at root window proxies too. --- diff --git a/src/xterm.c b/src/xterm.c index aef3d2d840f..e3935bacb9a 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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