]> git.eshelyaron.com Git - emacs.git/commitdiff
Make DND between frames work properly
authorPo Lu <luangruo@yahoo.com>
Sun, 20 Mar 2022 08:21:45 +0000 (16:21 +0800)
committerPo Lu <luangruo@yahoo.com>
Sun, 20 Mar 2022 08:21:45 +0000 (16:21 +0800)
* src/xterm.c (handle_one_xevent): Don't wait for a finish event
when dropping on top of another Emacs frame.

src/xterm.c

index 98888414d535ede5fd9ede076397b36ef42d278d..d094224952a1e5e1a40cd113517cee4ce0b9c700 100644 (file)
@@ -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;