comparison lwlib/xlwmenu.c @ 9079:ac51b5072431

*** empty log message ***
author Paul Reilly <pmr@pajato.com>
date Sun, 25 Sep 1994 00:22:16 +0000
parents 3c36c72db2bb
children 7812d2641010
comparison
equal deleted inserted replaced
9078:283534a85f5a 9079:ac51b5072431
27 #include <X11/ObjectP.h> 27 #include <X11/ObjectP.h>
28 #include <X11/StringDefs.h> 28 #include <X11/StringDefs.h>
29 #include <X11/cursorfont.h> 29 #include <X11/cursorfont.h>
30 #include <X11/bitmaps/gray> 30 #include <X11/bitmaps/gray>
31 #include "xlwmenuP.h" 31 #include "xlwmenuP.h"
32
33 static int disable_add_grab, disable_grab_pointer;
32 34
33 static int pointer_grabbed; 35 static int pointer_grabbed;
34 static XEvent menu_post_event; 36 static XEvent menu_post_event;
35 37
36 static char 38 static char
1444 } 1446 }
1445 else 1447 else
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;
1453 mw->menu.windows [0].y = ev->xmotion.y_root - ev->xmotion.y; 1456 mw->menu.windows [0].y = ev->xmotion.y_root - ev->xmotion.y;
1454 } 1457 }
1455 1458
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 {
1468 pointer_grabbed = 0; 1477 pointer_grabbed = 0;
1469 XtUngrabPointer ((Widget)mw, event->time); 1478 XtUngrabPointer ((Widget)mw, event->time);