/* Implements a lightweight menubar widget.
- Copyright (C) 1992 Lucid, Inc.
- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+Copyright (C) 1992 Lucid, Inc.
+Copyright (C) 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of the Lucid Widget Library.
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;