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; |
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 |
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. |