aboutsummaryrefslogtreecommitdiffstats
path: root/src/gtkutil.h
diff options
context:
space:
mode:
authorYuuki Harano2021-05-05 01:21:02 +0900
committerYuuki Harano2021-05-08 23:46:49 +0900
commit639d94fe14ce4d6036296c4b548ecbe4910ad7fa (patch)
tree20ae784f0c0157581ff59ca7b326e92728930d30 /src/gtkutil.h
parentff3d7190bbaebf196c0ac7f84d4869fa9362276f (diff)
downloademacs-639d94fe14ce4d6036296c4b548ecbe4910ad7fa.tar.gz
emacs-639d94fe14ce4d6036296c4b548ecbe4910ad7fa.zip
Entrust Gtk with handling tooltips
Previously, tooltips for menu items are below the menu. To solve it, set tooltip text on menu items in advance, and entrust gtk with handling tooltips. * src/gtkutil.c (xg_show_tooltip): New function for pgtk to set tooltip text on the widget. (xg_hide_tooltip): New function for pgtk to clear tooltip text on the widget. (xg_create_frame_widgets): Don't set initial tooltips text, and don't use qttip_cb. (xg_create_frame_outer_widgets): Ditto. (make_menu_item): Set tooltip text on the menu item. * src/gtkutil.h: New declaration of xg_show_tooltip for pgtk. * src/pgtkfns.c (Fx_show_tip): Calls xg_show_tooltip, and always ok.
Diffstat (limited to 'src/gtkutil.h')
-rw-r--r--src/gtkutil.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gtkutil.h b/src/gtkutil.h
index a421cee6ca4..4afdfe7405a 100644
--- a/src/gtkutil.h
+++ b/src/gtkutil.h
@@ -200,7 +200,11 @@ extern bool xg_prepare_tooltip (struct frame *f,
200 Lisp_Object string, 200 Lisp_Object string,
201 int *width, 201 int *width,
202 int *height); 202 int *height);
203#ifndef HAVE_PGTK
203extern void xg_show_tooltip (struct frame *f, int root_x, int root_y); 204extern void xg_show_tooltip (struct frame *f, int root_x, int root_y);
205#else
206extern void xg_show_tooltip (struct frame *f, Lisp_Object string);
207#endif
204extern bool xg_hide_tooltip (struct frame *f); 208extern bool xg_hide_tooltip (struct frame *f);
205 209
206#ifdef USE_CAIRO 210#ifdef USE_CAIRO