aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Reilly1994-09-25 00:22:16 +0000
committerPaul Reilly1994-09-25 00:22:16 +0000
commitd35cf493aca20f3d85df8243de1391d271dd589e (patch)
tree026ffd6559e704ba065644c318b9051523d678d8
parent3beeedfef771cfc8961873b79d935793f2aeaecb (diff)
downloademacs-d35cf493aca20f3d85df8243de1391d271dd589e.tar.gz
emacs-d35cf493aca20f3d85df8243de1391d271dd589e.zip
*** empty log message ***
-rw-r--r--lwlib/xlwmenu.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c
index 0df7a477bdd..32d9ea9f7cc 100644
--- a/lwlib/xlwmenu.c
+++ b/lwlib/xlwmenu.c
@@ -30,6 +30,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
30#include <X11/bitmaps/gray> 30#include <X11/bitmaps/gray>
31#include "xlwmenuP.h" 31#include "xlwmenuP.h"
32 32
33static int disable_add_grab, disable_grab_pointer;
34
33static int pointer_grabbed; 35static int pointer_grabbed;
34static XEvent menu_post_event; 36static XEvent menu_post_event;
35 37
@@ -1446,7 +1448,8 @@ pop_up_menu (mw, event)
1446 { 1448 {
1447 XEvent *ev = (XEvent *) event; 1449 XEvent *ev = (XEvent *) event;
1448 1450
1449 XtAddGrab ((Widget) mw, True, True); 1451 if (!disable_add_grab)
1452 XtAddGrab ((Widget) mw, True, True);
1450 1453
1451 /* notes the absolute position of the menubar window */ 1454 /* notes the absolute position of the menubar window */
1452 mw->menu.windows [0].x = ev->xmotion.x_root - ev->xmotion.x; 1455 mw->menu.windows [0].x = ev->xmotion.x_root - ev->xmotion.x;
@@ -1456,12 +1459,18 @@ pop_up_menu (mw, event)
1456#ifdef emacs 1459#ifdef emacs
1457 x_catch_errors (); 1460 x_catch_errors ();
1458#endif 1461#endif
1459 XtGrabPointer ((Widget)mw, False, 1462 if (!disable_grab_pointer)
1460 (PointerMotionMask | PointerMotionHintMask | ButtonReleaseMask 1463 {
1461 | ButtonPressMask), 1464 XtGrabPointer ((Widget)mw, False,
1462 GrabModeAsync, GrabModeAsync, None, mw->menu.cursor_shape, 1465 (PointerMotionMask
1463 event->time); 1466 | PointerMotionHintMask
1464 pointer_grabbed = 1; 1467 | ButtonReleaseMask
1468 | ButtonPressMask),
1469 GrabModeAsync, GrabModeAsync, None,
1470 mw->menu.cursor_shape,
1471 event->time);
1472 pointer_grabbed = 1;
1473 }
1465#ifdef emacs 1474#ifdef emacs
1466 if (x_had_errors_p ()) 1475 if (x_had_errors_p ())
1467 { 1476 {