diff options
| author | Yuuki Harano | 2021-05-05 01:21:02 +0900 |
|---|---|---|
| committer | Yuuki Harano | 2021-05-08 23:46:49 +0900 |
| commit | 639d94fe14ce4d6036296c4b548ecbe4910ad7fa (patch) | |
| tree | 20ae784f0c0157581ff59ca7b326e92728930d30 /src/gtkutil.h | |
| parent | ff3d7190bbaebf196c0ac7f84d4869fa9362276f (diff) | |
| download | emacs-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.h | 4 |
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 | ||
| 203 | extern void xg_show_tooltip (struct frame *f, int root_x, int root_y); | 204 | extern void xg_show_tooltip (struct frame *f, int root_x, int root_y); |
| 205 | #else | ||
| 206 | extern void xg_show_tooltip (struct frame *f, Lisp_Object string); | ||
| 207 | #endif | ||
| 204 | extern bool xg_hide_tooltip (struct frame *f); | 208 | extern bool xg_hide_tooltip (struct frame *f); |
| 205 | 209 | ||
| 206 | #ifdef USE_CAIRO | 210 | #ifdef USE_CAIRO |