diff options
author | Karoly Lorentey <[email protected]> | 2006-01-02 07:43:46 +0000 |
---|---|---|
committer | Karoly Lorentey <[email protected]> | 2006-01-02 07:43:46 +0000 |
commit | 2dfa0facd984e792dd9ac55ff7648d09b4e1855c (patch) | |
tree | 4d5cb4ba98de1c661e5fe7a89f0123a57fc22bfb /lwlib/xlwmenu.c | |
parent | 00d385b0ced3e7c6bccac72903fa0b5499717eab (diff) |
Install workaround for "X protocol error: BadCursor (invalid Cursor parameter) on protocol request 2"
* lwlib/xlwmenu.c (XlwMenuRealize): Ignore X errors while setting up
cursor shape.
git-archimport-id: [email protected]/emacs--multi-tty--0--patch-483
Diffstat (limited to 'lwlib/xlwmenu.c')
-rw-r--r-- | lwlib/xlwmenu.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c index 1f6cad8d3f..8f5e738208 100644 --- a/lwlib/xlwmenu.c +++ b/lwlib/xlwmenu.c @@ -1825,6 +1825,7 @@ XlwMenuRealize (w, valueMask, attributes) XlwMenuWidget mw = (XlwMenuWidget)w; XSetWindowAttributes xswa; int mask; + int count; (*xlwMenuWidgetClass->core_class.superclass->core_class.realize) (w, valueMask, attributes); @@ -1832,7 +1833,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 + 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; |