aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2006-01-02 07:43:46 +0000
committerKaroly Lorentey2006-01-02 07:43:46 +0000
commit2dfa0facd984e792dd9ac55ff7648d09b4e1855c (patch)
tree4d5cb4ba98de1c661e5fe7a89f0123a57fc22bfb
parent00d385b0ced3e7c6bccac72903fa0b5499717eab (diff)
downloademacs-2dfa0facd984e792dd9ac55ff7648d09b4e1855c.tar.gz
emacs-2dfa0facd984e792dd9ac55ff7648d09b4e1855c.zip
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
-rw-r--r--lwlib/xlwmenu.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c
index 1f6cad8d3f2..8f5e7382086 100644
--- a/lwlib/xlwmenu.c
+++ b/lwlib/xlwmenu.c
@@ -1825,6 +1825,7 @@ XlwMenuRealize (w, valueMask, attributes)
1825 XlwMenuWidget mw = (XlwMenuWidget)w; 1825 XlwMenuWidget mw = (XlwMenuWidget)w;
1826 XSetWindowAttributes xswa; 1826 XSetWindowAttributes xswa;
1827 int mask; 1827 int mask;
1828 int count;
1828 1829
1829 (*xlwMenuWidgetClass->core_class.superclass->core_class.realize) 1830 (*xlwMenuWidgetClass->core_class.superclass->core_class.realize)
1830 (w, valueMask, attributes); 1831 (w, valueMask, attributes);
@@ -1832,7 +1833,16 @@ XlwMenuRealize (w, valueMask, attributes)
1832 xswa.save_under = True; 1833 xswa.save_under = True;
1833 xswa.cursor = mw->menu.cursor_shape; 1834 xswa.cursor = mw->menu.cursor_shape;
1834 mask = CWSaveUnder | CWCursor; 1835 mask = CWSaveUnder | CWCursor;
1836 /* I sometimes get random BadCursor errors while creating the first
1837 frame on a display. I can not find their reason, but they are
1838 annoying so for now let's ignore any errors here. -- lorentey */
1839#ifdef emacs
1840 count = x_catch_errors (XtDisplay (w));
1841#endif
1835 XChangeWindowAttributes (XtDisplay (w), XtWindow (w), mask, &xswa); 1842 XChangeWindowAttributes (XtDisplay (w), XtWindow (w), mask, &xswa);
1843#ifdef emacs
1844 x_uncatch_errors (XtDisplay (w), count);
1845#endif
1836 1846
1837 mw->menu.windows [0].window = XtWindow (w); 1847 mw->menu.windows [0].window = XtWindow (w);
1838 mw->menu.windows [0].x = w->core.x; 1848 mw->menu.windows [0].x = w->core.x;