/[emacs]/emacs/lwlib/xlwmenu.c
ViewVC logotype

Diff of /emacs/lwlib/xlwmenu.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.49 by jhd, Mon Apr 22 18:21:06 2002 UTC revision 1.50 by jhd, Sun Apr 28 19:54:01 2002 UTC
# Line 257  WidgetClass xlwMenuWidgetClass = (Widget Line 257  WidgetClass xlwMenuWidgetClass = (Widget
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    
# Line 271  ungrab_all (w, ungrabtime) Line 273  ungrab_all (w, ungrabtime)
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.  */
# Line 2334  pop_up_menu (mw, event) Line 2336  pop_up_menu (mw, event)
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          {          {

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.50

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26