aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-07-07 19:24:56 +0000
committerRichard M. Stallman1994-07-07 19:24:56 +0000
commita51b963cea1190c7b05d2c11c3ebe8f5dd6377a1 (patch)
tree60e0577e484beba51972e5685d90a4e1e3f7246c /src
parent9926ab6410cd0a4bdb54a0b51664c353b4193ccc (diff)
downloademacs-a51b963cea1190c7b05d2c11c3ebe8f5dd6377a1.tar.gz
emacs-a51b963cea1190c7b05d2c11c3ebe8f5dd6377a1.zip
(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')
-rw-r--r--src/xmenu.c12
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)
1416 Position root_x, root_y; 1416 Position root_x, root_y;
1417 1417
1418 int first_pane; 1418 int first_pane;
1419 int next_release_must_exit = 0;
1419 1420
1420 *error = NULL; 1421 *error = NULL;
1421 1422
@@ -1655,16 +1656,27 @@ xmenu_show (f, x, y, menubarp, keymaps, title, error)
1655 Vmouse_depressed = Qnil; 1656 Vmouse_depressed = Qnil;
1656 } 1657 }
1657 if (! (menu_item_selection == 0 1658 if (! (menu_item_selection == 0
1659 && !next_release_must_exit
1658 && (((XButtonEvent *) (&event))->time - last_event_timestamp 1660 && (((XButtonEvent *) (&event))->time - last_event_timestamp
1659 < XINT (Vdouble_click_time)))) 1661 < XINT (Vdouble_click_time))))
1660 break; 1662 break;
1663 /* Don't call XtDispatchEvent again for the same event! */
1664 continue;
1661 } 1665 }
1662 else if (event.type == ButtonPress) 1666 else if (event.type == ButtonPress)
1663 { 1667 {
1668 next_release_must_exit = 1;
1669#if 0
1670 XtDispatchEvent (&event);
1664 /* Any mouse button activity that doesn't select in the menu 1671 /* Any mouse button activity that doesn't select in the menu
1665 should unpost the menu. */ 1672 should unpost the menu. */
1666 if (menu_item_selection == 0) 1673 if (menu_item_selection == 0)
1667 break; 1674 break;
1675#endif
1676 /* Don't call XtDispatchEvent for the down event.
1677 Doing so seems to give strange results
1678 when you click on the menu bar while a menu is posted. */
1679 continue;
1668 } 1680 }
1669 else if (event.type == KeyPress) 1681 else if (event.type == KeyPress)
1670 { 1682 {