/[emacs]/emacs/oldXMenu/Activate.c
ViewVC logotype

Diff of /emacs/oldXMenu/Activate.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by jhd, Fri Nov 12 08:28:57 2004 UTC revision 1.9 by jhd, Mon Dec 27 15:23:22 2004 UTC
# Line 81  Line 81 
81    
82  #include <config.h>  #include <config.h>
83  #include "XMenuInt.h"  #include "XMenuInt.h"
84    #include <X11/keysym.h>
85    
86  /* For debug, set this to 0 to not grab the keyboard on menu popup */  /* For debug, set this to 0 to not grab the keyboard on menu popup */
87  int x_menu_grab_keyboard = 1;  int x_menu_grab_keyboard = 1;
# Line 131  XMenuActivate(display, menu, p_num, s_nu Line 132  XMenuActivate(display, menu, p_num, s_nu
132      Window root, child;      Window root, child;
133      int root_x, root_y, win_x, win_y;      int root_x, root_y, win_x, win_y;
134      unsigned int mask;      unsigned int mask;
135        KeySym keysym;
136    
137      /*      /*
138       * Define and allocate a foreign event queue to hold events       * Define and allocate a foreign event queue to hold events
# Line 458  XMenuActivate(display, menu, p_num, s_nu Line 460  XMenuActivate(display, menu, p_num, s_nu
460                  }                  }
461                  selection = True;                  selection = True;
462                  break;                  break;
463            case KeyPress:
464            case KeyRelease:
465                    keysym = XLookupKeysym (&event.xkey, 0);
466    
467                    /* Pop down on C-g and Escape.  */
468                    if ((keysym == XK_g && (event.xkey.state & ControlMask) != 0)
469                        || keysym == XK_Escape) /* Any escape, ignore modifiers.  */
470                      {
471                        ret_val = XM_NO_SELECT;
472                        selection = True;
473                      }
474                   break;
475              default:              default:
476                  /*                  /*
477                   * If AEQ mode is enabled then queue the event.                   * If AEQ mode is enabled then queue the event.

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26