summaryrefslogtreecommitdiff
path: root/lisp/tooltip.el
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-01-29 05:06:02 +0000
committerPo Lu <luangruo@yahoo.com>2022-01-29 05:11:04 +0000
commit95ccd1ba47771349e23aedf0981861fd5074bd7e (patch)
tree564a39fc44516cc3f95ddc79ddc991dd25035e32 /lisp/tooltip.el
parent70fc32f6ddef871dd2ae15a3333974f6d8231d6a (diff)
downloademacs-95ccd1ba47771349e23aedf0981861fd5074bd7e.tar.gz
Implement real menu help-echo text on Haiku
* lisp/tooltip.el (tooltip-show-help): Remove Haiku-specific conditional since that's now taken care of by C code. * src/haiku_io.c (haiku_read_size): (haiku_read_with_timeout): (haiku_write_without_signal): Add parameter `popup_p'. All callers changed. (port_popup_menu_to_emacs): New variable. * src/haiku_support.cc (struct be_popup_menu_data): New structure. (be_popup_menu_thread_entry): New function. (class EmacsMenuItem): New field `menu_ptr'. (Highlight): Send help text to the popup port if this item isn't for a menu bar. (BMenu_add_item): Set menu_ptr appropriately. (BMenu_run): Complete rewrite that allows to read help text from the menu bar port. * src/haiku_support.h (struct haiku_menu_bar_help_event): New fields for popup menus. * src/haikumenu.c (digest_menu_items): Only set help tooltip on popup menus when system tooltips are enabled. (haiku_menu_show_help): (haiku_process_pending_signals_for_menu): New functions. (haiku_menu_show): Pass new callbacks.
Diffstat (limited to 'lisp/tooltip.el')
-rw-r--r--lisp/tooltip.el7
1 files changed, 1 insertions, 6 deletions
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index 2aa487d0454..9d523e79679 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -375,12 +375,7 @@ It is also called if Tooltip mode is on, for text-only displays."
(defun tooltip-show-help (msg)
"Function installed as `show-help-function'.
MSG is either a help string to display, or nil to cancel the display."
- (if (and (display-graphic-p)
- ;; On Haiku, system tooltips can't be displayed above
- ;; menus.
- (or (not (and (eq window-system 'haiku)
- haiku-use-system-tooltips))
- (not (menu-or-popup-active-p))))
+ (if (and (display-graphic-p))
(let ((previous-help tooltip-help-message))
(setq tooltip-help-message msg)
(cond ((null msg)