]> code.delx.au - gnu-emacs/blobdiff - src/xmenu.c
(set_case_table): If standard is nonzero, setup
[gnu-emacs] / src / xmenu.c
index 0de318323a33c21f61e9b5bf55c0c58dffd2c1c9..c17e1e801b7ff8fc1a98b2137de8c75ad3422beb 100644 (file)
@@ -137,6 +137,8 @@ static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, char **));
 #ifdef USE_GTK
 /* gtk just uses utf-8.  */
 # define ENCODE_MENU_STRING(str) ENCODE_UTF_8 (str)
+#elif defined HAVE_X_I18N
+# define ENCODE_MENU_STRING(str) ENCODE_SYSTEM (str)
 #else
 # define ENCODE_MENU_STRING(str) string_make_unibyte (str)
 #endif
@@ -2488,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);