diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-07-07 19:24:56 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-07-07 19:24:56 +0000 |
commit | 5b28d18cbdcbf37b368eb28ec2f4bbfe59a7c70f (patch) | |
tree | 3d9a88fbc2b269adde5340120d5b0fa7a9796a54 /src/xmenu.c | |
parent | 9f6db32c6d1a642a098f09486c6e7d7db800a083 (diff) | |
download | emacs-5b28d18cbdcbf37b368eb28ec2f4bbfe59a7c70f.tar.gz |
(xmenu_show) {USE_X_TOOLKIT}: ButtonPress no longer pops
down; instead it forces the next ButtonRelease to exit. Don't
dispatch on ButtonPress events.
Diffstat (limited to 'src/xmenu.c')
-rw-r--r-- | src/xmenu.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index f5121e2bfed..12b76516e8c 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1416,6 +1416,7 @@ xmenu_show (f, x, y, menubarp, keymaps, title, error) Position root_x, root_y; int first_pane; + int next_release_must_exit = 0; *error = NULL; @@ -1655,16 +1656,27 @@ xmenu_show (f, x, y, menubarp, keymaps, title, error) Vmouse_depressed = Qnil; } if (! (menu_item_selection == 0 + && !next_release_must_exit && (((XButtonEvent *) (&event))->time - last_event_timestamp < XINT (Vdouble_click_time)))) break; + /* Don't call XtDispatchEvent again for the same event! */ + continue; } else if (event.type == ButtonPress) { + next_release_must_exit = 1; +#if 0 + XtDispatchEvent (&event); /* Any mouse button activity that doesn't select in the menu should unpost the menu. */ if (menu_item_selection == 0) break; +#endif + /* Don't call XtDispatchEvent for the down event. + Doing so seems to give strange results + when you click on the menu bar while a menu is posted. */ + continue; } else if (event.type == KeyPress) { |