From ff18668fa0cdc0c5cfb694c824ef0aa7cf1193cc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Thu, 24 Mar 2005 18:53:43 +0000 Subject: [PATCH] * xmenu.c (create_and_show_popup_menu): Just remove menu and return if it failed to pop up (Gnome "show pointer on ctrl" option makes menus fail to pop up). --- src/ChangeLog | 6 ++++++ src/xmenu.c | 13 ++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c0e782eb6f..f0b648b6eb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2005-03-24 Jan Dj,Ad(Brv + + * xmenu.c (create_and_show_popup_menu): Just remove menu and return + if it failed to pop up (Gnome "show pointer on ctrl" option makes + menus fail to pop up). + 2005-03-24 Stefan * xdisp.c (get_next_display_element): Also use `\ ' & `\-' for latin-9. diff --git a/src/xmenu.c b/src/xmenu.c index 0cb0b73b71..c17e1e801b 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -2490,11 +2490,14 @@ create_and_show_popup_menu (f, first_wv, x, y, for_click) record_unwind_protect (pop_down_menu, make_save_value (menu, 0)); - /* Set this to one. popup_widget_loop increases it by one, so it becomes - two. show_help_echo uses this to detect popup menus. */ - popup_activated_flag = 1; - /* Process events that apply to the menu. */ - popup_widget_loop (1, menu); + if (GTK_WIDGET_MAPPED (menu)) + { + /* Set this to one. popup_widget_loop increases it by one, so it becomes + two. show_help_echo uses this to detect popup menus. */ + popup_activated_flag = 1; + /* Process events that apply to the menu. */ + popup_widget_loop (1, menu); + } unbind_to (specpdl_count, Qnil); -- 2.20.1