emacs-diffs
[Top][All Lists]
Advanced

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

master 4431cf6047: Don't baselessly ignore frames after passing through


From: Po Lu
Subject: master 4431cf6047: Don't baselessly ignore frames after passing through the root window
Date: Mon, 4 Apr 2022 01:18:16 -0400 (EDT)

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

    Don't baselessly ignore frames after passing through the root window
    
    * src/xterm.c (x_dnd_begin_drag_and_drop):
    (handle_one_xevent): Don't rely on target not being None to set
    x_dnd_return_frame to 2.
---
 src/xterm.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/xterm.c b/src/xterm.c
index c70b31c5ad..969be23c7a 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -9072,11 +9072,11 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, 
Atom xaction,
                | SubstructureNotifyMask
                | PropertyChangeMask);
 
+  if (EQ (return_frame, Qnow))
+    x_dnd_update_state (FRAME_DISPLAY_INFO (f), CurrentTime);
+
   while (x_dnd_in_progress || x_dnd_waiting_for_finish)
     {
-      if (EQ (return_frame, Qnow))
-       x_dnd_update_state (FRAME_DISPLAY_INFO (f), CurrentTime);
-
       hold_quit.kind = NO_EVENT;
 #ifdef USE_GTK
       current_finish = X_EVENT_NORMAL;
@@ -12835,6 +12835,10 @@ x_dnd_update_state (struct x_display_info *dpyinfo, 
Time timestamp)
 
       if (target != x_dnd_last_seen_window)
        {
+         if (target != FRAME_OUTER_WINDOW (x_dnd_frame)
+             && x_dnd_return_frame == 1)
+           x_dnd_return_frame = 2;
+
          if (x_dnd_last_seen_window != None
              && x_dnd_last_protocol_version != -1
              && x_dnd_last_seen_window != FRAME_OUTER_WINDOW (x_dnd_frame))
@@ -12858,10 +12862,6 @@ x_dnd_update_state (struct x_display_info *dpyinfo, 
Time timestamp)
                                                 x_dnd_last_seen_window, &lmsg);
            }
 
-         if (target != FRAME_OUTER_WINDOW (x_dnd_frame)
-             && x_dnd_return_frame == 1)
-           x_dnd_return_frame = 2;
-
          if (x_dnd_return_frame == 2
              && x_any_window_to_frame (dpyinfo, target))
            {
@@ -14466,6 +14466,10 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 
            if (target != x_dnd_last_seen_window)
              {
+               if (target != FRAME_OUTER_WINDOW (x_dnd_frame)
+                   && x_dnd_return_frame == 1)
+                 x_dnd_return_frame = 2;
+
                if (x_dnd_last_seen_window != None
                    && x_dnd_last_protocol_version != -1
                    && x_dnd_last_seen_window != FRAME_OUTER_WINDOW 
(x_dnd_frame))
@@ -14510,10 +14514,6 @@ handle_one_xevent (struct x_display_info *dpyinfo,
                      }
                  }
 
-               if (target != FRAME_OUTER_WINDOW (x_dnd_frame)
-                   && x_dnd_return_frame == 1)
-                 x_dnd_return_frame = 2;
-
                if (x_dnd_return_frame == 2
                    && x_any_window_to_frame (dpyinfo, target))
                  {
@@ -15918,6 +15918,10 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 
                  if (target != x_dnd_last_seen_window)
                    {
+                     if (target != FRAME_OUTER_WINDOW (x_dnd_frame)
+                         && x_dnd_return_frame == 1)
+                       x_dnd_return_frame = 2;
+
                      if (x_dnd_last_seen_window != None
                          && x_dnd_last_protocol_version != -1
                          && x_dnd_last_seen_window != FRAME_OUTER_WINDOW 
(x_dnd_frame))
@@ -15964,10 +15968,6 @@ handle_one_xevent (struct x_display_info *dpyinfo,
                            }
                        }
 
-                     if (target != FRAME_OUTER_WINDOW (x_dnd_frame)
-                         && x_dnd_return_frame == 1)
-                       x_dnd_return_frame = 2;
-
                      if (x_dnd_return_frame == 2
                          && x_any_window_to_frame (dpyinfo, target))
                        {



reply via email to

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