changeset 60890:a48e83530ac6

* 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).
author Jan Djärv <jan.h.d@swipnet.se>
date Thu, 24 Mar 2005 18:53:43 +0000
parents 9c0af190d335
children 8881d5e2d23f
files src/ChangeLog src/xmenu.c
diffstat 2 files changed, 14 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu Mar 24 17:42:50 2005 +0000
+++ b/src/ChangeLog	Thu Mar 24 18:53:43 2005 +0000
@@ -1,3 +1,9 @@
+2005-03-24  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
+
+	* 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  <monnier@iro.umontreal.ca>
 
 	* xdisp.c (get_next_display_element): Also use `\ ' & `\-' for latin-9.
--- a/src/xmenu.c	Thu Mar 24 17:42:50 2005 +0000
+++ b/src/xmenu.c	Thu Mar 24 18:53:43 2005 +0000
@@ -2490,11 +2490,14 @@
 
   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);