--- hw/xnest/GCOps.c 2006/12/30 19:12:55 1.1 +++ hw/xnest/GCOps.c 2006/12/30 19:14:24 @@ -39,6 +39,11 @@ is" without express or implied warranty. #include "Drawable.h" #include "Visual.h" +static int xnestDummyErrorHandler(Display *dpy, XErrorEvent *ev) +{ + return 0; +} + void xnestFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nSpans, xPoint *pPoints, int *pWidths, int fSorted) @@ -103,9 +108,12 @@ xnestGetImage(DrawablePtr pDrawable, int { XImage *ximage; int length; + int (*oldHandler)(Display *, XErrorEvent *); + oldHandler = XSetErrorHandler(xnestDummyErrorHandler); ximage = XGetImage(xnestDisplay, xnestDrawable(pDrawable), x, y, w, h, planeMask, format); + XSetErrorHandler(oldHandler); if (ximage) { length = ximage->bytes_per_line * ximage->height;