]> git.eshelyaron.com Git - emacs.git/commitdiff
Set last user time during drag-and-drop
authorPo Lu <luangruo@yahoo.com>
Mon, 25 Apr 2022 01:00:13 +0000 (09:00 +0800)
committerPo Lu <luangruo@yahoo.com>
Mon, 25 Apr 2022 01:00:13 +0000 (09:00 +0800)
* src/xterm.c (XTmouse_position): Set last user time if
track-mouse is drag-source or dropping.

src/xterm.c

index 4661f731cd0bf0d0e30b2810397d9f6bf386e91f..0f93e4807fc60bff8943d5c47c72b10f1452ad04 100644 (file)
@@ -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))