aboutsummaryrefslogtreecommitdiffstats
path: root/src/xmenu.c
diff options
context:
space:
mode:
authorKaroly Lorentey2005-02-04 15:36:07 +0000
committerKaroly Lorentey2005-02-04 15:36:07 +0000
commit077f3dd9e0510164a37dcdfa69db9fe0b48675d9 (patch)
tree6e117d59746e46bf69ee1c8cf0b71521d672f783 /src/xmenu.c
parent44d7460c77fa0c27513944bb8b6f819976b01cda (diff)
parente67d06eb0d71b8d769b467a8cea28aa8d761a906 (diff)
downloademacs-077f3dd9e0510164a37dcdfa69db9fe0b48675d9.tar.gz
emacs-077f3dd9e0510164a37dcdfa69db9fe0b48675d9.zip
Merged from miles@gnu.org--gnu-2005 (patch 76-78)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-76 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-77 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-78 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-288
Diffstat (limited to 'src/xmenu.c')
-rw-r--r--src/xmenu.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index f6e0523378f..b6a5186f1f1 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1445,9 +1445,9 @@ menu_highlight_callback (widget, id, call_data)
1445/* Find the menu selection and store it in the keyboard buffer. 1445/* Find the menu selection and store it in the keyboard buffer.
1446 F is the frame the menu is on. 1446 F is the frame the menu is on.
1447 MENU_BAR_ITEMS_USED is the length of VECTOR. 1447 MENU_BAR_ITEMS_USED is the length of VECTOR.
1448 VECTOR is an array of menu events for the whole menu. 1448 VECTOR is an array of menu events for the whole menu. */
1449 */ 1449
1450void 1450static void
1451find_and_call_menu_selection (f, menu_bar_items_used, vector, client_data) 1451find_and_call_menu_selection (f, menu_bar_items_used, vector, client_data)
1452 FRAME_PTR f; 1452 FRAME_PTR f;
1453 int menu_bar_items_used; 1453 int menu_bar_items_used;
@@ -1554,6 +1554,17 @@ menubar_selection_callback (widget, client_data)
1554 if (! cb_data || ! cb_data->cl_data || ! cb_data->cl_data->f) 1554 if (! cb_data || ! cb_data->cl_data || ! cb_data->cl_data->f)
1555 return; 1555 return;
1556 1556
1557 /* When a menu is popped down, X generates a focus event (i.e. focus
1558 goes back to the frame below the menu). Since GTK buffers events,
1559 we force it out here before the menu selection event. Otherwise
1560 sit-for will exit at once if the focus event follows the menu selection
1561 event. */
1562
1563 BLOCK_INPUT;
1564 while (gtk_events_pending ())
1565 gtk_main_iteration ();
1566 UNBLOCK_INPUT;
1567
1557 find_and_call_menu_selection (cb_data->cl_data->f, 1568 find_and_call_menu_selection (cb_data->cl_data->f,
1558 cb_data->cl_data->menu_bar_items_used, 1569 cb_data->cl_data->menu_bar_items_used,
1559 cb_data->cl_data->menu_bar_vector, 1570 cb_data->cl_data->menu_bar_vector,