From: Po Lu Date: Mon, 18 Jul 2022 04:42:23 +0000 (+0800) Subject: Preserve echo area message when running DND mouse movement function X-Git-Tag: emacs-29.0.90~1447^2~872 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5480d02cc56bb787f6cd1f81bb1626793f6e1247;p=emacs.git Preserve echo area message when running DND mouse movement function * 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. --- diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index 3a0bd65f29c..55fe11a097c 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -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. diff --git a/src/xterm.c b/src/xterm.c index 53c640ca6c2..0436d3c00c0 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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); } }