From 647e4a92bbb771e248c640b9ea4737f928ba187e Mon Sep 17 00:00:00 2001 From: Yuuki Harano Date: Sat, 8 May 2021 23:43:19 +0900 Subject: [PATCH] * src/pgtkmenu.c (show_help_event): Let emacs not show menu tooltips --- src/pgtkmenu.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/pgtkmenu.c b/src/pgtkmenu.c index 59cc9c25dc5..b8f4619d7d0 100644 --- a/src/pgtkmenu.c +++ b/src/pgtkmenu.c @@ -162,6 +162,21 @@ popup_deactivate_callback (GtkWidget * widget, gpointer client_data) static void show_help_event (struct frame *f, GtkWidget * widget, Lisp_Object help) { + /* Don't show this tooltip. + * Tooltips are always tied to main widget, so stacking order + * on Wayland is: + * (above) + * - menu + * - tooltip + * - main widget + * (below) + * This is applicable to tooltips for menu, and menu tooltips + * are shown below menus. + * As a workaround, I entrust Gtk with menu tooltips, and + * let emacs not to show menu tooltips. + */ + +#if 0 Lisp_Object frame; if (f) @@ -171,6 +186,7 @@ show_help_event (struct frame *f, GtkWidget * widget, Lisp_Object help) } else show_help_echo (help, Qnil, Qnil, Qnil); +#endif } /* Callback called when menu items are highlighted/unhighlighted -- 2.39.5