emacs-diffs
[Top][All Lists]
Advanced

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

master 18ec3fcce9: Restore pending_signals at a point in the DND event l


From: Po Lu
Subject: master 18ec3fcce9: Restore pending_signals at a point in the DND event loop
Date: Sat, 16 Apr 2022 20:39:24 -0400 (EDT)

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

    Restore pending_signals at a point in the DND event loop
    
    * src/xterm.c (x_dnd_begin_drag_and_drop): Restore
    pending_signals after unblock_input.
---
 src/xterm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/xterm.c b/src/xterm.c
index b65de88674..89dd28c0d5 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -9465,6 +9465,7 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, 
Atom xaction,
   XTextProperty prop;
   xm_drop_start_message dmsg;
   Lisp_Object frame_object, x, y, frame, local_value;
+  bool signals_were_pending;
 #ifdef HAVE_XKB
   XkbStateRec keyboard_state;
 #endif
@@ -9674,7 +9675,12 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, 
Atom xaction,
                         &next_event, &finish, &hold_quit);
 #endif
 #endif
+      /* The unblock_input below might try to read input, but
+        XTread_socket does nothing inside a drag-and-drop event
+        loop, so don't let it clear the pending_signals flag.  */
+      signals_were_pending = pending_signals;
       unblock_input ();
+      pending_signals = signals_were_pending;
 
       if (x_dnd_movement_frame)
        {



reply via email to

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