emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/oldXMenu/Activate.c


From: Jan Djärv
Subject: [Emacs-diffs] Changes to emacs/oldXMenu/Activate.c
Date: Mon, 27 Dec 2004 10:36:52 -0500

Index: emacs/oldXMenu/Activate.c
diff -c emacs/oldXMenu/Activate.c:1.8 emacs/oldXMenu/Activate.c:1.9
*** emacs/oldXMenu/Activate.c:1.8       Fri Nov 12 08:28:57 2004
--- emacs/oldXMenu/Activate.c   Mon Dec 27 15:23:22 2004
***************
*** 81,86 ****
--- 81,87 ----
  
  #include <config.h>
  #include "XMenuInt.h"
+ #include <X11/keysym.h>
  
  /* For debug, set this to 0 to not grab the keyboard on menu popup */
  int x_menu_grab_keyboard = 1;
***************
*** 131,136 ****
--- 132,138 ----
      Window root, child;
      int root_x, root_y, win_x, win_y;
      unsigned int mask;
+     KeySym keysym;
  
      /*
       * Define and allocate a foreign event queue to hold events
***************
*** 458,463 ****
--- 460,477 ----
                }
                selection = True;
                break;
+         case KeyPress:
+         case KeyRelease:
+                 keysym = XLookupKeysym (&event.xkey, 0);
+ 
+                 /* Pop down on C-g and Escape.  */
+                 if ((keysym == XK_g && (event.xkey.state & ControlMask) != 0)
+                     || keysym == XK_Escape) /* Any escape, ignore modifiers.  
*/
+                   {
+                     ret_val = XM_NO_SELECT;
+                     selection = True;
+                   }
+                break;
            default:
                /*
                 * If AEQ mode is enabled then queue the event.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]