From 9fab134ee8b4ed439a8944e0d7058b1898c9bc0b Mon Sep 17 00:00:00 2001 From: Po Lu Date: Mon, 4 Apr 2022 07:25:27 +0800 Subject: [PATCH] * src/xterm.c (x_dnd_get_target_window): Look at root window proxies too. --- src/xterm.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) 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 -- 2.39.5