aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/tooltip.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/tooltip.el')
-rw-r--r--lisp/tooltip.el17
1 files changed, 12 insertions, 5 deletions
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index 1cf16fdb5d2..2aa487d0454 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -339,6 +339,8 @@ This is used by `tooltip-show-help' and
339(defvar tooltip-previous-message nil 339(defvar tooltip-previous-message nil
340 "The previous content of the echo area.") 340 "The previous content of the echo area.")
341 341
342(defvar haiku-use-system-tooltips)
343
342(defun tooltip-show-help-non-mode (help) 344(defun tooltip-show-help-non-mode (help)
343 "Function installed as `show-help-function' when Tooltip mode is off. 345 "Function installed as `show-help-function' when Tooltip mode is off.
344It is also called if Tooltip mode is on, for text-only displays." 346It is also called if Tooltip mode is on, for text-only displays."
@@ -374,8 +376,10 @@ It is also called if Tooltip mode is on, for text-only displays."
374 "Function installed as `show-help-function'. 376 "Function installed as `show-help-function'.
375MSG is either a help string to display, or nil to cancel the display." 377MSG is either a help string to display, or nil to cancel the display."
376 (if (and (display-graphic-p) 378 (if (and (display-graphic-p)
377 (or (not (eq window-system 'haiku)) ;; On Haiku, there isn't a reliable way to show tooltips 379 ;; On Haiku, system tooltips can't be displayed above
378 ;; above menus. 380 ;; menus.
381 (or (not (and (eq window-system 'haiku)
382 haiku-use-system-tooltips))
379 (not (menu-or-popup-active-p)))) 383 (not (menu-or-popup-active-p))))
380 (let ((previous-help tooltip-help-message)) 384 (let ((previous-help tooltip-help-message))
381 (setq tooltip-help-message msg) 385 (setq tooltip-help-message msg)
@@ -383,9 +387,12 @@ MSG is either a help string to display, or nil to cancel the display."
383 ;; Cancel display. This also cancels a delayed tip, if 387 ;; Cancel display. This also cancels a delayed tip, if
384 ;; there is one. 388 ;; there is one.
385 (tooltip-hide)) 389 (tooltip-hide))
386 ((equal-including-properties previous-help msg) 390 ((equal previous-help msg)
387 ;; Same help as before (but possibly the mouse has moved). 391 ;; Same help as before (but possibly the mouse has
388 ;; Keep what we have. 392 ;; moved or the text properties have changed). Keep
393 ;; what we have. If only text properties have changed,
394 ;; the tooltip won't be updated, but that shouldn't
395 ;; occur.
389 ) 396 )
390 (t 397 (t
391 ;; A different help. Remove a previous tooltip, and 398 ;; A different help. Remove a previous tooltip, and