]> git.eshelyaron.com Git - emacs.git/commitdiff
Preserve echo area message when running DND mouse movement function
authorPo Lu <luangruo@yahoo.com>
Mon, 18 Jul 2022 04:42:23 +0000 (12:42 +0800)
committerPo Lu <luangruo@yahoo.com>
Mon, 18 Jul 2022 04:42:55 +0000 (12:42 +0800)
* lisp/term/x-win.el (x-dnd-movement): Stop redisplaying here.
* src/xterm.c (x_dnd_begin_drag_and_drop): Redisplay with the
echo area preserved.

lisp/term/x-win.el
src/xterm.c

index 3a0bd65f29cf4299acadbedab9ced5966a6259b7..55fe11a097cc6ebbaedd49c00d96d53b46c9d7da 100644 (file)
@@ -1568,8 +1568,7 @@ frames on all displays."
 
 (defun x-dnd-movement (_frame position)
   "Handle movement to POSITION during drag-and-drop."
-  (dnd-handle-movement position)
-  (redisplay))
+  (dnd-handle-movement position))
 
 (defun x-device-class (name)
   "Return the device class of NAME.
index 53c640ca6c26dc8d0376376c58640d06598793a7..0436d3c00c0c03dd94536a42102a950d274812aa 100644 (file)
@@ -11779,6 +11779,11 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, Atom xaction,
                         Fposn_at_x_y (x, y, frame_object, Qnil));
                  x_dnd_unwind_flag = false;
                  unbind_to (ref, Qnil);
+
+                 /* Redisplay this way to preserve the echo area.
+                    Otherwise, the contents will abruptly disappear
+                    when the mouse moves over a frame.  */
+                 redisplay_preserve_echo_area (33);
                }
            }