]> git.eshelyaron.com Git - emacs.git/commitdiff
Disable tooltip timeouts for drag-and-drop tooltips
authorPo Lu <luangruo@yahoo.com>
Thu, 9 Jun 2022 08:43:29 +0000 (16:43 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 9 Jun 2022 08:44:17 +0000 (16:44 +0800)
* lisp/mouse.el (mouse-drag-and-drop-region-display-tooltip):
Don't time out the created tooltip.

lisp/mouse.el

index 11014fa1c5f12b83cc381419a0d9430105a44aeb..9cf6635a01fc5c523db95ade5a20062b32a9365e 100644 (file)
@@ -3056,7 +3056,10 @@ Call `tooltip-show-help-non-mode' instead on non-graphical displays."
          (setf (alist-get 'border-color params) fg))
        (when (stringp bg)
          (setf (alist-get 'background-color params) bg))
-        (x-show-tip tooltip nil params))
+        ;; Don't time out: this leads to very confusing behavior when
+        ;; Emacs isn't visible, and the only indication that the user
+        ;; is actually dragging something abruptly disappears.
+        (x-show-tip tooltip nil params most-positive-fixnum))
     (tooltip-show-help-non-mode tooltip)))
 
 (declare-function x-hide-tip "xfns.c")