emacs-diffs
[Top][All Lists]
Advanced

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

master b55059bbeb 2/2: Prevent XdndPosition messages from rarely being s


From: Po Lu
Subject: master b55059bbeb 2/2: Prevent XdndPosition messages from rarely being sent out of band
Date: Fri, 1 Jul 2022 04:19:01 -0400 (EDT)

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

    Prevent XdndPosition messages from rarely being sent out of band
    
    * src/xterm.c (handle_one_xevent): Don't clear
    `x_dnd_waiting_for_status_window' if a pending position message
    was sent in reply to an XdndStatus event.
---
 src/xterm.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/xterm.c b/src/xterm.c
index fa43371f05..c83ddc6b9e 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -16456,10 +16456,15 @@ handle_one_xevent (struct x_display_info *dpyinfo,
                    XSendEvent (dpyinfo->display, target,
                                False, NoEventMask,
                                &x_dnd_pending_send_position);
-                 }
+                   x_dnd_pending_send_position.type = 0;
 
-               x_dnd_pending_send_position.type = 0;
-               x_dnd_waiting_for_status_window = None;
+                   /* Since we sent another XdndPosition message, we
+                      have to wait for another one in reply, so don't
+                      reset `x_dnd_waiting_for_status_window'
+                      here.  */
+                 }
+               else
+                 x_dnd_waiting_for_status_window = None;
              }
 
            goto done;



reply via email to

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