X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/70fff7b1002401c91fe8d6df6491e1ae1f71e02c..73b26103c8702823941b3ab6cda56befdac43857:/lwlib/xlwmenu.c diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c index b3929d34a3..db12eb43ec 100644 --- a/lwlib/xlwmenu.c +++ b/lwlib/xlwmenu.c @@ -1,7 +1,7 @@ /* 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, 2009 Free Software Foundation, Inc. This file is part of the Lucid Widget Library. @@ -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;