aboutsummaryrefslogtreecommitdiffstats
path: root/lwlib
diff options
context:
space:
mode:
authorJan Djärv2002-04-28 19:54:30 +0000
committerJan Djärv2002-04-28 19:54:30 +0000
commit005e0d57fc82a1f6ca8b207e2d94dc9849e5e71f (patch)
tree2b2160b798cc1c5961b517714065b6304fbb34d8 /lwlib
parent8a42a102ef817b88a8eabe12de85542829779223 (diff)
downloademacs-005e0d57fc82a1f6ca8b207e2d94dc9849e5e71f.tar.gz
emacs-005e0d57fc82a1f6ca8b207e2d94dc9849e5e71f.zip
Do not grab keyboard if installation-directory is
non-nil (not installed Emacs). To simplify debugging.
Diffstat (limited to 'lwlib')
-rw-r--r--lwlib/ChangeLog5
-rw-r--r--lwlib/xlwmenu.c10
2 files changed, 11 insertions, 4 deletions
diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog
index 28626ddc255..3ead711d797 100644
--- a/lwlib/ChangeLog
+++ b/lwlib/ChangeLog
@@ -1,3 +1,8 @@
12002-04-28 Jan D. <jan.h.d@swipnet.se>
2
3 * xlwmenu.c: Do not grab keyboard if installation-directory is
4 non-nil (not installed Emacs). To simplify debugging.
5
12002-04-28 Pavel Jan,Bm(Bk <Pavel@Janik.cz> 62002-04-28 Pavel Jan,Bm(Bk <Pavel@Janik.cz>
2 7
3 * Makefile.in: Remove OpenLook file dependencies. 8 * Makefile.in: Remove OpenLook file dependencies.
diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c
index 53dc7022857..d98ce469f9f 100644
--- a/lwlib/xlwmenu.c
+++ b/lwlib/xlwmenu.c
@@ -257,8 +257,10 @@ WidgetClass xlwMenuWidgetClass = (WidgetClass) &xlwMenuClassRec;
257 257
258int submenu_destroyed; 258int submenu_destroyed;
259 259
260/* For debug, set this to 0 to not grab the keyboard on menu popup */ 260/* For debug, if installation-directory is non-nil this is not an installed
261int x_menu_grab_keyboard = 1; 261 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))
262 264
263static int next_release_must_exit; 265static int next_release_must_exit;
264 266
@@ -271,7 +273,7 @@ ungrab_all (w, ungrabtime)
271 Time ungrabtime; 273 Time ungrabtime;
272{ 274{
273 XtUngrabPointer (w, ungrabtime); 275 XtUngrabPointer (w, ungrabtime);
274 if (x_menu_grab_keyboard) XtUngrabKeyboard (w, ungrabtime); 276 if (GRAB_KEYBOARD) XtUngrabKeyboard (w, ungrabtime);
275} 277}
276 278
277/* Like abort, but remove grabs from widget W before. */ 279/* Like abort, but remove grabs from widget W before. */
@@ -2334,7 +2336,7 @@ pop_up_menu (mw, event)
2334 mw->menu.cursor_shape, 2336 mw->menu.cursor_shape,
2335 event->time) == Success) 2337 event->time) == Success)
2336 { 2338 {
2337 if (! x_menu_grab_keyboard 2339 if (! GRAB_KEYBOARD
2338 || XtGrabKeyboard ((Widget)mw, False, GrabModeAsync, 2340 || XtGrabKeyboard ((Widget)mw, False, GrabModeAsync,
2339 GrabModeAsync, event->time) == Success) 2341 GrabModeAsync, event->time) == Success)
2340 { 2342 {