257 |
|
|
258 |
int submenu_destroyed; |
int submenu_destroyed; |
259 |
|
|
260 |
/* For debug, set this to 0 to not grab the keyboard on menu popup */ |
/* For debug, if installation-directory is non-nil this is not an installed |
261 |
int x_menu_grab_keyboard = 1; |
Emacs. In that case we do not grab the keyboard to make it easier to |
262 |
|
debug. */ |
263 |
|
#define GRAB_KEYBOARD (EQ (Vinstallation_directory, Qnil)) |
264 |
|
|
265 |
static int next_release_must_exit; |
static int next_release_must_exit; |
266 |
|
|
273 |
Time ungrabtime; |
Time ungrabtime; |
274 |
{ |
{ |
275 |
XtUngrabPointer (w, ungrabtime); |
XtUngrabPointer (w, ungrabtime); |
276 |
if (x_menu_grab_keyboard) XtUngrabKeyboard (w, ungrabtime); |
if (GRAB_KEYBOARD) XtUngrabKeyboard (w, ungrabtime); |
277 |
} |
} |
278 |
|
|
279 |
/* Like abort, but remove grabs from widget W before. */ |
/* Like abort, but remove grabs from widget W before. */ |
2336 |
mw->menu.cursor_shape, |
mw->menu.cursor_shape, |
2337 |
event->time) == Success) |
event->time) == Success) |
2338 |
{ |
{ |
2339 |
if (! x_menu_grab_keyboard |
if (! GRAB_KEYBOARD |
2340 |
|| XtGrabKeyboard ((Widget)mw, False, GrabModeAsync, |
|| XtGrabKeyboard ((Widget)mw, False, GrabModeAsync, |
2341 |
GrabModeAsync, event->time) == Success) |
GrabModeAsync, event->time) == Success) |
2342 |
{ |
{ |