emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master e1178eb640: Make DND between frames work properly


From: Po Lu
Subject: master e1178eb640: Make DND between frames work properly
Date: Sun, 20 Mar 2022 04:23:45 -0400 (EDT)

branch: master
commit e1178eb6405f8aa9196ecaede464707277a90afa
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    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.
---
 src/xterm.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/xterm.c b/src/xterm.c
index 98888414d5..d094224952 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;
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]