From 5480d02cc56bb787f6cd1f81bb1626793f6e1247 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Mon, 18 Jul 2022 12:42:23 +0800 Subject: [PATCH] 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. --- lisp/term/x-win.el | 3 +-- src/xterm.c | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) 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); } } -- 2.39.5