aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/xmenu.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index 096ff34559c..516dee694f4 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -153,7 +153,7 @@ static int menu_items_n_panes;
153static int menu_items_submenu_depth; 153static int menu_items_submenu_depth;
154 154
155/* Flag which when set indicates a dialog or menu has been posted by 155/* Flag which when set indicates a dialog or menu has been posted by
156 Xt on behalf of one of the widget sets. */ 156 Xt on behalf of one of the widget sets. */
157static int popup_activated_flag; 157static int popup_activated_flag;
158 158
159 159
@@ -337,7 +337,7 @@ menu_item_equiv_key (item_string, item1, descrip_ptr)
337 if (! EQ (def1, def) 337 if (! EQ (def1, def)
338 /* If the command is an alias for another 338 /* If the command is an alias for another
339 (such as easymenu.el and lmenu.el set it up), 339 (such as easymenu.el and lmenu.el set it up),
340 check if the original command matches the cached command. */ 340 check if the original command matches the cached command. */
341 && !(SYMBOLP (def) && SYMBOLP (XSYMBOL (def)->function) 341 && !(SYMBOLP (def) && SYMBOLP (XSYMBOL (def)->function)
342 && EQ (def1, XSYMBOL (def)->function)) 342 && EQ (def1, XSYMBOL (def)->function))
343 /* If something had no key binding before, don't recheck it-- 343 /* If something had no key binding before, don't recheck it--
@@ -1001,7 +1001,10 @@ on the left of the dialog box and all following items on the right.\n\
1001#ifdef USE_X_TOOLKIT 1001#ifdef USE_X_TOOLKIT
1002 1002
1003/* Loop in Xt until the menu pulldown or dialog popup has been 1003/* Loop in Xt until the menu pulldown or dialog popup has been
1004 popped down (deactivated). */ 1004 popped down (deactivated).
1005
1006 NOTE: All calls to popup_get_selection() should be protected
1007 with BLOCK_INPUT, UNBLOCK_INPUT wrappers. */
1005void 1008void
1006popup_get_selection (initial_event) 1009popup_get_selection (initial_event)
1007 XEvent *initial_event; 1010 XEvent *initial_event;
@@ -1015,16 +1018,14 @@ popup_get_selection (initial_event)
1015 1018
1016 while (1) 1019 while (1)
1017 { 1020 {
1018 BLOCK_INPUT;
1019 XtDispatchEvent (&event); 1021 XtDispatchEvent (&event);
1020 UNBLOCK_INPUT;
1021 if (!popup_activated()) 1022 if (!popup_activated())
1022 break; 1023 break;
1023 XtAppNextEvent (Xt_app_con, &event); 1024 XtAppNextEvent (Xt_app_con, &event);
1024 } 1025 }
1025} 1026}
1026 1027
1027/* Detect if a dialog or menu has been posted. */ 1028/* Detect if a dialog or menu has been posted. */
1028int 1029int
1029popup_activated () 1030popup_activated ()
1030{ 1031{
@@ -1129,7 +1130,7 @@ menubar_selection_callback (widget, id, client_data)
1129} 1130}
1130 1131
1131/* This callback is invoked when a dialog or menu is finished being 1132/* This callback is invoked when a dialog or menu is finished being
1132 used and has been unposted. */ 1133 used and has been unposted. */
1133 1134
1134static void 1135static void
1135popup_deactivate_callback (widget, id, client_data) 1136popup_deactivate_callback (widget, id, client_data)
@@ -1357,7 +1358,7 @@ update_frame_menubar (f)
1357 XtVaSetValues (x->menubar_widget, XtNmappedWhenManaged, 1, 0); 1358 XtVaSetValues (x->menubar_widget, XtNmappedWhenManaged, 1, 0);
1358 } 1359 }
1359 1360
1360 /* Re-manage the text-area widget, and then thrash the sizes. */ 1361 /* Re-manage the text-area widget, and then thrash the sizes. */
1361 XtManageChild (x->edit_widget); 1362 XtManageChild (x->edit_widget);
1362 lw_refigure_widget (x->column_widget, True); 1363 lw_refigure_widget (x->column_widget, True);
1363 1364
@@ -1425,7 +1426,7 @@ set_frame_menubar (f, first_time)
1425 menu trees we supply, rather than just the menu bar item names. */ 1426 menu trees we supply, rather than just the menu bar item names. */
1426 lw_modify_all_widgets (id, first_wv, 1); 1427 lw_modify_all_widgets (id, first_wv, 1);
1427 1428
1428 /* Re-enable the edit widget to resize. */ 1429 /* Re-enable the edit widget to resize. */
1429 lw_allow_resizing (f->display.x->widget, True); 1430 lw_allow_resizing (f->display.x->widget, True);
1430 } 1431 }
1431 else 1432 else
@@ -1745,7 +1746,7 @@ xmenu_show (f, x, y, menubarp, keymaps, title, error)
1745 } 1746 }
1746 } 1747 }
1747 1748
1748 /* Deal with the title, if it is non-nil. */ 1749 /* Deal with the title, if it is non-nil. */
1749 if (!NILP (title)) 1750 if (!NILP (title))
1750 { 1751 {
1751 widget_value *wv_title = malloc_widget_value (); 1752 widget_value *wv_title = malloc_widget_value ();