]> git.eshelyaron.com Git - emacs.git/commitdiff
(popup_get_selection): On receiving a KeyPress event
authorAndreas Schwab <schwab@suse.de>
Mon, 23 Mar 1998 13:02:15 +0000 (13:02 +0000)
committerAndreas Schwab <schwab@suse.de>
Mon, 23 Mar 1998 13:02:15 +0000 (13:02 +0000)
only deactivate the menu when the key is not a modifier key.

src/xmenu.c

index 1e6b0b13f1f5e323e7f7ed9732c456d9126ab77f..09cc1af864c81a07b83ac787e0cc33de395f1dbe 100644 (file)
@@ -1025,8 +1025,12 @@ popup_get_selection (initial_event, dpyinfo, id)
       else if (event.type == KeyPress
               && dpyinfo->display == event.xbutton.display)
        {
-         popup_activated_flag = 0;
-         break;
+         KeySym keysym = XLookupKeysym (&event.xkey, 0);
+         if (!IsModifierKey (keysym))
+           {
+             popup_activated_flag = 0;
+             break;
+           }
        }
       /* Button presses outside the menu also pop it down.  */
       else if (event.type == ButtonPress