I intend to apply the attached patch to master. Its ChangeLog goes as below. Comments and suggestions welcome. Thanks, martin ------------------------------------------------------------------- Fix some tooltip related problems Replace 'tooltip' frame parameter with a 'tooltip' member in the frame structure. For GTK+ builds use 'tip_last_frame' to find the frame for which the currently visible tooltip was made. For modeline help-echoing have tooltips show applicable actions only. * lisp/bindings.el (mode-line-default-help-echo): New function as default value of homonymous option. * src/dispextern.h (tip_frame, tip_window): Remove declarations. * src/frame.c (make_frame): Initialize new frame structure member 'tooltip'. (Fframe_list, other_frames): Rewrite with new macro FRAME_TOOLTIP_P. (syms_of_frame): Remove Qtooltip. * src/frame.h (struct frame): New member 'tooltip'. (FRAME_TOOLTIP_P): New macro. * src/gtkutil.c (xg_prepare_tooltip, xg_hide_tooltip): Rewrite using boolean return values. * src/nsfns.m (tip_frame): Remove declaration. * src/w32fns.c (w32_display_monitor_attributes_list) (w32_display_monitor_attributes_list_fallback): Rewrite with new macro FRAME_TOOLTIP_P. (tip_last_string, tip_last_frame, tip_last_parms): New Lisp scalars replacing Lisp vector last_show_tip_args. (x_create_tip_frame): Set new frame's 'tooltip' structure member to true, remove setting of Qtooltip frame parameter. (x_hide_tip): Additionally test tip_frame for liveness. (Fx_show_tip): Handle last_show_tip_args to tip_last_frame, tip_last_string and tip_last_parms conversion. (syms_of_w32fns): staticpro tip_last_frame, tip_last_string and tip_last_parms instead of last_show_tip_args. * src/w32term.c (w32_read_socket, x_new_font): Rewrite with new macro FRAME_TOOLTIP_P. * src/w32term.h (tip_window): Add external declaration. * src/xdisp.c (x_consider_frame_title, prepare_menu_bars) (should_produce_line_number): Rewrite with new macro FRAME_TOOLTIP_P. (note_mode_line_or_margin_highlight): If `mode-line-default-help-echo' specifies a function, call it to produce help echo string. * src/xfns.c (x_make_monitor_attribute_list) (Fx_display_monitor_attributes_list): Rewrite with new macro FRAME_TOOLTIP_P. (tip_last_string, tip_last_frame, tip_last_parms): New Lisp scalars replacing Lisp vector last_show_tip_args. (x_create_tip_frame): Set new frame's 'tooltip' structure member to true, remove setting of Qtooltip frame parameter. (x_hide_tip): Rewrite with additional tests of frames for liveness and taking into account that for GTK+ tips the reference frame is now stored in tip_last_frame instead of tip_frame. (Fx_show_tip): Handle last_show_tip_args to tip_last_frame, tip_last_string and tip_last_parms conversion. For GTK+ store FRAME argument in tip_last-frame. (syms_of_xfns): staticpro tip_last_frame, tip_last_string and tip_last_parms instead of last_show_tip_args. * src/xterm.c (x_update_begin, handle_one_xevent, x_new_font) (x_set_window_size): Rewrite with new macro FRAME_TOOLTIP_P. * src/xterm.h (tip_window): Add external declaration.