/* Implements a lightweight menubar widget.
Copyright (C) 1992 Lucid, Inc.
- Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of the Lucid Widget Library.
unsigned long *,
double, int));
extern int x_catch_errors __P ((Display*));
-extern int x_uncatch_errors __P ((Display*, int));
+extern void x_uncatch_errors P_ ((Display *, int));
extern int x_had_errors_p __P ((Display*));
-extern int x_clear_errors __P ((Display*));
+extern void x_clear_errors __P ((Display*));
extern unsigned long x_copy_dpy_color __P ((Display *, Colormap,
unsigned long));
XlwMenuWidget mw = (XlwMenuWidget)w;
XSetWindowAttributes xswa;
int mask;
+ int count;
(*xlwMenuWidgetClass->core_class.superclass->core_class.realize)
(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
+ count = x_catch_errors (XtDisplay (w));
+#endif
XChangeWindowAttributes (XtDisplay (w), XtWindow (w), mask, &xswa);
+#ifdef emacs
+ x_uncatch_errors (XtDisplay (w), count);
+#endif
mw->menu.windows [0].window = XtWindow (w);
mw->menu.windows [0].x = w->core.x;
find_next_selectable (mw, item, skip_titles)
XlwMenuWidget mw;
widget_value *item;
+ int skip_titles;
{
widget_value *current = item;
enum menu_separator separator;
find_prev_selectable (mw, item, skip_titles)
XlwMenuWidget mw;
widget_value *item;
+ int skip_titles;
{
widget_value *current = item;
widget_value *prev = item;