mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-12 14:30:42 -08:00
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: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-483
This commit is contained in:
parent
00d385b0ce
commit
2dfa0facd9
1 changed files with 10 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue