2009-08-04 21:52:16 +02:00
|
|
|
Index: build-3Jvc9fE/xorg-server-1.6.3/hw/xnest/GCOps.c
|
2006-12-18 15:48:26 +01:00
|
|
|
===================================================================
|
2009-08-04 21:52:16 +02:00
|
|
|
--- build-3Jvc9fE/xorg-server-1.6.3.orig/hw/xnest/GCOps.c
|
|
|
|
+++ build-3Jvc9fE/xorg-server-1.6.3/hw/xnest/GCOps.c
|
|
|
|
@@ -94,6 +94,13 @@ xnestPutImage(DrawablePtr pDrawable, GCP
|
2006-12-18 15:48:26 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
+static int
|
|
|
|
+xnestIgnoreErrorHandler (Display *display,
|
|
|
|
+ XErrorEvent *event)
|
|
|
|
+{
|
|
|
|
+ return False; /* return value is ignored */
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
void
|
|
|
|
xnestGetImage(DrawablePtr pDrawable, int x, int y, int w, int h,
|
|
|
|
unsigned int format, unsigned long planeMask,
|
2009-08-04 21:52:16 +02:00
|
|
|
@@ -101,9 +108,13 @@ xnestGetImage(DrawablePtr pDrawable, int
|
2006-12-18 15:48:26 +01:00
|
|
|
{
|
|
|
|
XImage *ximage;
|
|
|
|
int length;
|
|
|
|
+ int (*old_handler)(Display*, XErrorEvent*);
|
|
|
|
|
|
|
|
+ /* we may get BadMatch error when xnest window is minimized */
|
|
|
|
+ old_handler = XSetErrorHandler (xnestIgnoreErrorHandler);
|
|
|
|
ximage = XGetImage(xnestDisplay, xnestDrawable(pDrawable),
|
|
|
|
x, y, w, h, planeMask, format);
|
|
|
|
+ XSetErrorHandler (old_handler);
|
|
|
|
|
|
|
|
if (ximage) {
|
|
|
|
length = ximage->bytes_per_line * ximage->height;
|