comparison src/xmenu.c @ 21268:74fc1642fe30

(popup_get_selection): On receiving a KeyPress event only deactivate the menu when the key is not a modifier key.
author Andreas Schwab <schwab@suse.de>
date Mon, 23 Mar 1998 13:02:15 +0000
parents 50929073a0ba
children fa9ff387d260
comparison
equal deleted inserted replaced
21267:5396874c652c 21268:74fc1642fe30
1023 /* If the user presses a key, deactivate the menu. 1023 /* If the user presses a key, deactivate the menu.
1024 The user is likely to do that if we get wedged. */ 1024 The user is likely to do that if we get wedged. */
1025 else if (event.type == KeyPress 1025 else if (event.type == KeyPress
1026 && dpyinfo->display == event.xbutton.display) 1026 && dpyinfo->display == event.xbutton.display)
1027 { 1027 {
1028 popup_activated_flag = 0; 1028 KeySym keysym = XLookupKeysym (&event.xkey, 0);
1029 break; 1029 if (!IsModifierKey (keysym))
1030 {
1031 popup_activated_flag = 0;
1032 break;
1033 }
1030 } 1034 }
1031 /* Button presses outside the menu also pop it down. */ 1035 /* Button presses outside the menu also pop it down. */
1032 else if (event.type == ButtonPress 1036 else if (event.type == ButtonPress
1033 && event.xany.display == dpyinfo->display 1037 && event.xany.display == dpyinfo->display
1034 && x_any_window_to_frame (dpyinfo, event.xany.window)) 1038 && x_any_window_to_frame (dpyinfo, event.xany.window))