From: Po Lu Date: Sun, 20 Mar 2022 08:21:45 +0000 (+0800) Subject: Make DND between frames work properly X-Git-Tag: emacs-29.0.90~1931^2~1031 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e1178eb6405f8aa9196ecaede464707277a90afa;p=emacs.git Make DND between frames work properly * src/xterm.c (handle_one_xevent): Don't wait for a finish event when dropping on top of another Emacs frame. --- diff --git a/src/xterm.c b/src/xterm.c index 98888414d53..d094224952a 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -12429,7 +12429,10 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (x_dnd_last_seen_window != None && x_dnd_last_protocol_version != -1) { - x_dnd_waiting_for_finish = true; + /* Crazy hack to make dragging from one frame to + another work. */ + x_dnd_waiting_for_finish = !x_any_window_to_frame (dpyinfo, + x_dnd_last_seen_window); x_dnd_pending_finish_target = x_dnd_last_seen_window; x_dnd_waiting_for_finish_proto = x_dnd_last_protocol_version; @@ -13414,7 +13417,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (x_dnd_last_seen_window != None && x_dnd_last_protocol_version != -1) { - x_dnd_waiting_for_finish = true; + x_dnd_waiting_for_finish = !x_any_window_to_frame (dpyinfo, + x_dnd_last_seen_window); x_dnd_pending_finish_target = x_dnd_last_seen_window; x_dnd_waiting_for_finish_proto = x_dnd_last_protocol_version;