diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-08-28 07:39:12 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-08-28 07:39:12 +0000 |
commit | 03b78673fb71aa01a455624ae2a841c7dd1b8767 (patch) | |
tree | 75e97c564973ccc640ca4c1b5465053512032c4e | |
parent | f7d786d0cb3cdaa61c10dfcbf0180192e4d75938 (diff) | |
download | emacs-03b78673fb71aa01a455624ae2a841c7dd1b8767.tar.gz |
(xmenu_show): Don't queue events that are in the menu bar.
-rw-r--r-- | src/xmenu.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index 8716d96c6d9..1adf12fbcc0 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1650,7 +1650,7 @@ xmenu_show (f, x, y, menubarp, keymaps, title, error) { XEvent event; int queue_and_exit = 0; - int in_this_menu; + int in_this_menu = 0, in_menu_bar = 0; Widget widget; XtAppNextEvent (Xt_app_con, &event); @@ -1658,7 +1658,7 @@ xmenu_show (f, x, y, menubarp, keymaps, title, error) /* Check whether the event happened in the menu or any child of it. */ widget = XtWindowToWidget (XDISPLAY event.xany.window); - in_this_menu = 0; + while (widget) { if (widget == menu) @@ -1666,6 +1666,11 @@ xmenu_show (f, x, y, menubarp, keymaps, title, error) in_this_menu = 1; break; } + if (widget == f->display.x->menubar_widget) + { + in_menu_bar = 1; + break; + } widget = XtParent (widget); } @@ -1742,7 +1747,7 @@ xmenu_show (f, x, y, menubarp, keymaps, title, error) XtDispatchEvent (&event); - if (queue_and_exit || !in_this_menu) + if (queue_and_exit || (!in_this_menu && !in_menu_bar)) { queue_tmp = (struct event_queue *) malloc (sizeof (struct event_queue)); |