(Fixit): Favor C-/ keybinding for undo throughout. Link to Erasing
[bpt/emacs.git] / lwlib / xlwmenu.c
index 9b066f0..6316b13 100644 (file)
@@ -1,13 +1,13 @@
 /* Implements a lightweight menubar widget.
 Copyright (C) 1992 Lucid, Inc.
 Copyright (C) 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, 2004,
-  2005, 2006, 2007  Free Software Foundation, Inc.
+  2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 
 This file is part of the Lucid Widget Library.
 
 The Lucid Widget Library is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
+the Free Software Foundation; either version 2, or (at your option)
 any later version.
 
 The Lucid Widget Library is distributed in the hope that it will be useful,
@@ -1844,7 +1844,16 @@ XlwMenuRealize (w, valueMask, attributes)
   xswa.save_under = True;
   xswa.cursor = mw->menu.cursor_shape;
   mask = CWSaveUnder | CWCursor;
+  /* I sometimes get random BadCursor errors while creating the first
+     frame on a display.  I can not find their reason, but they are
+     annoying so for now let's ignore any errors here.  -- lorentey  */
+#ifdef emacs
+  x_catch_errors (XtDisplay (w));
+#endif
   XChangeWindowAttributes (XtDisplay (w), XtWindow (w), mask, &xswa);
+#ifdef emacs
+  x_uncatch_errors ();
+#endif
 
   mw->menu.windows [0].window = XtWindow (w);
   mw->menu.windows [0].x = w->core.x;