summaryrefslogtreecommitdiff
path: root/src/xmenu.c
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2004-12-27 20:34:03 +0000
committerJan Djärv <jan.h.d@swipnet.se>2004-12-27 20:34:03 +0000
commit33385c6fa06f2a9faef28252cd2e073b11e84c20 (patch)
tree110b797d0bcf24977e2475ff2d3622aaf645a979 /src/xmenu.c
parente2a57f28903ea556dd4e7594f1a95e5f290c95af (diff)
downloademacs-33385c6fa06f2a9faef28252cd2e073b11e84c20.tar.gz
* xmenu.c (popup_get_selection): Only pop down dialogs
on C-g and Escape.
Diffstat (limited to 'src/xmenu.c')
-rw-r--r--src/xmenu.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index 55c28d831e8..ba4177fab67 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1232,25 +1232,16 @@ popup_get_selection (initial_event, dpyinfo, id, do_timers, down_on_keypress)
event.xbutton.state = 0;
#endif
}
- /* If the user presses a key that doesn't go to the menu,
- deactivate the menu.
- The user is likely to do that if we get wedged.
- All toolkits now pop down menus on ESC.
- For dialogs however, the focus may not be on the dialog, so
- in that case, we pop down. */
+ /* Pop down on C-g and Escape. */
else if (event.type == KeyPress
&& down_on_keypress
&& dpyinfo->display == event.xbutton.display)
{
KeySym keysym = XLookupKeysym (&event.xkey, 0);
- /* Pop down on C-g. */
- if (keysym == XK_g && (event.xkey.state & ControlMask) != 0)
+ if ((keysym == XK_g && (event.xkey.state & ControlMask) != 0)
+ || keysym == XK_Escape) /* Any escape, ignore modifiers. */
popup_activated_flag = 0;
-
- if (!IsModifierKey (keysym)
- && x_any_window_to_frame (dpyinfo, event.xany.window) != NULL)
- popup_activated_flag = 0;
}
x_dispatch_event (&event, event.xany.display);