From: Po Lu Date: Mon, 25 Apr 2022 01:00:13 +0000 (+0800) Subject: Set last user time during drag-and-drop X-Git-Tag: emacs-29.0.90~1931^2~323 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3780741116f7ad5f320f7741a22a0bd8a8238621;p=emacs.git Set last user time during drag-and-drop * src/xterm.c (XTmouse_position): Set last user time if track-mouse is drag-source or dropping. --- diff --git a/src/xterm.c b/src/xterm.c index 4661f731cd0..0f93e4807fc 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -10717,6 +10717,16 @@ XTmouse_position (struct frame **fp, int insist, Lisp_Object *bar_window, #endif /* USE_X_TOOLKIT */ } + /* Set last user time to avoid confusing some window managers + about the tooltip displayed during drag-and-drop. */ + + if ((EQ (track_mouse, Qdrag_source) + || EQ (track_mouse, Qdropping)) + && (dpyinfo->last_user_time + < dpyinfo->last_mouse_movement_time)) + x_display_set_last_user_time (dpyinfo, + dpyinfo->last_mouse_movement_time); + if ((!f1 || FRAME_TOOLTIP_P (f1)) && (EQ (track_mouse, Qdropping) || EQ (track_mouse, Qdrag_source))