+2002-04-28 Jan D. <jan.h.d@swipnet.se>
+
+ * xlwmenu.c: Do not grab keyboard if installation-directory is
+ non-nil (not installed Emacs). To simplify debugging.
+
2002-04-28 Pavel Jan\e,Bm\e(Bk <Pavel@Janik.cz>
* Makefile.in: Remove OpenLook file dependencies.
int submenu_destroyed;
-/* For debug, set this to 0 to not grab the keyboard on menu popup */
-int x_menu_grab_keyboard = 1;
+/* For debug, if installation-directory is non-nil this is not an installed
+ Emacs. In that case we do not grab the keyboard to make it easier to
+ debug. */
+#define GRAB_KEYBOARD (EQ (Vinstallation_directory, Qnil))
static int next_release_must_exit;
Time ungrabtime;
{
XtUngrabPointer (w, ungrabtime);
- if (x_menu_grab_keyboard) XtUngrabKeyboard (w, ungrabtime);
+ if (GRAB_KEYBOARD) XtUngrabKeyboard (w, ungrabtime);
}
/* Like abort, but remove grabs from widget W before. */
mw->menu.cursor_shape,
event->time) == Success)
{
- if (! x_menu_grab_keyboard
+ if (! GRAB_KEYBOARD
|| XtGrabKeyboard ((Widget)mw, False, GrabModeAsync,
GrabModeAsync, event->time) == Success)
{