(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))
+ (if (and (display-graphic-p)
+ ;; Tooltips can't be displayed on top of the global menu
+ ;; bar on NS.
+ (or (not (eq window-system 'ns))
+ (menu-or-popup-active-p)))
(let ((previous-help tooltip-help-message))
(setq tooltip-help-message msg)
(cond ((null msg)
: Qnil;
}
-#ifdef NS_IMPL_GNUSTEP
-/* The code below doesn't work on Mac OS X, because it runs a nested
- Carbon-related event loop to track menu bar movement.
-
- But it works fine aside from that, so it will work on GNUstep if
- they start to call `willHighlightItem'. */
- (void) menu: (NSMenu *) menu willHighlightItem: (NSMenuItem *) item
{
NSInteger idx = [item tag];
XSETFRAME (frame, f);
help = AREF (vec, idx + MENU_ITEMS_ITEM_HELP);
+ popup_activated_flag++;
if (STRINGP (help) || NILP (help))
- kbd_buffer_store_help_event (frame, help);
-
- raise (SIGIO);
+ show_help_echo (help, Qnil, Qnil, Qnil);
+ popup_activated_flag--;
}
-#endif
#ifdef NS_IMPL_GNUSTEP
- (void) close