diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2016-07-12 09:16:26 +0300 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2016-07-12 09:16:26 +0300 |
commit | 20038f8ab75dd1551412a43cd58520c483c22921 (patch) | |
tree | b42949b761e9642ae6dabc2cfb399f2000207e46 /src/menu.c | |
parent | 8ea599254784e3e6da37ec7ea73f1f6ec6a92ff1 (diff) | |
download | emacs-20038f8ab75dd1551412a43cd58520c483c22921.tar.gz emacs-20038f8ab75dd1551412a43cd58520c483c22921.tar.bz2 emacs-20038f8ab75dd1551412a43cd58520c483c22921.zip |
Cleanup tooltips
* src/dispextern.h (toplevel): Remove 'tip_frame' and 'tip_window' decls.
* src/frame.h (struct frame): New bitfield to indicate tooltip frame.
(FRAME_TOOLTIP_P): New macro.
* src/frame.c (make_frame): Mark new frame as regular frame by default.
(Fframe_list, delete_frame): Redesign to use FRAME_TOOLTIP_P.
(syms_of_frame): Don't DEFSYM 'Qtooltip' but use 'Qtooltip_timer'
and 'Qtooltip_parameters' instead.
* src/gtkutil.h (toplevel): Add 'xg_hide_tip' decl.
* src/gtkutil.c (xg_hide_tip): New function.
(xg_hide_tooltip): Adjust to cancel GTK event loop timeout if needed.
* src/menu.c (Fx_popup_menu): Adjust call to Fx_hide_tip.
* src/nsfns.c (toplevel): Remove 'tip_frame' leftover.
* src/w32fns.c (unwind_create_tip_frame): Remove.
(w32_display_monitor_attributes_list)
(w32_display_monitor_attributes_list_fallback): Use FRAME_TOOLTIP_P.
(toplevel): Remove 'tip_frame', 'tip_window' and 'last_show_tip_args'.
(x_create_tip_frame): Use do_unwind_create_frame. Mark new frame
as a tooltip frame and record it using appropriate display info.
(x_hide_tooltip): Add frame arg.
(Fx_show_tip): Adjust to avoid globals, store tooltip parameters among
base frame parameters, store tooltip hide timer among tooltip frame
parameters.
(Fx_hide_tip): Add frame arg, hide tooltips on all displays by default.
(syms_of_w32fns): Don't DEFSYM 'Qtip_frame', don't initialize
and GC-protect 'tip_timer', 'tip_frame' and 'last_show_tip_args'.
* src/w32term.c (w32_read_socket): Extract tooltip window id from
per-display data. Use FRAME_TOOLTIP_P where appropriate.
(x_new_font): Use FRAME_TOOLTIP_P.
(x_free_frame_resources): Reset pointer to tooltip frame.
* src/w32term.h (struct w32_display_info): New member 'w32_tooltip_frame'.
* src/xdisp.c (init_iterator, x_consider_frame_title, prepare_menu_bars):
Use FRAME_TOOLTIP_P.
* src/xfns.c (x_make_monitor_attribute_list)
(Fx_display_monitor_attributes_list): Likewise.
(unwind_create_tip_frame): Remove.
(toplevel): Remove 'tip_frame', 'tip_window' and 'last_show_tip_args'.
(x_create_tip_frame): Use do_unwind_create_frame. Mark new frame
as a tooltip frame and record it using appropriate display info.
(x_hide_tooltip): Add frame arg.
(Fx_show_tip): Adjust to avoid globals, store tooltip parameters among
base frame parameters, store tooltip hide timer among tooltip frame
parameters. To hide GTK system tooltip, use timeout hooked into GTK
event loop.
(Fx_hide_tip): Add frame arg, hide tooltips on all displays by default.
(syms_of_xfns): Don't DEFSYM 'Qtip_frame', don't initialize
and GC-protect 'tip_timer', 'tip_frame' and 'last_show_tip_args'.
* src/xterm.c (handle_one_xevent): Extract tooltip window id from
per-display data. Use FRAME_TOOLTIP_P where appropriate.
(x_new_font, x_set_window_size): Use FRAME_TOOLTIP_P.
(x_free_frame_resources): Reset pointer to tooltip frame.
* src/xterm.h (struct x_display_info): New member 'x_tooltip_frame'.
(struct x_output) [USE_GTK_TOOLTIP]: New member 'ttip_timeout'.
Diffstat (limited to 'src/menu.c')
-rw-r--r-- | src/menu.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/menu.c b/src/menu.c index 90bb19a2e94..675caff6b88 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1400,7 +1400,12 @@ no quit occurs and `x-popup-menu' returns nil. */) #ifdef HAVE_WINDOW_SYSTEM /* Hide a previous tip, if any. */ if (!FRAME_TERMCAP_P (f)) - Fx_hide_tip (); + { + Lisp_Object frame; + + XSETFRAME (frame, f); + Fx_hide_tip (frame); + } #endif #ifdef HAVE_NTGUI /* FIXME: Is it really w32-specific? --Stef */ |