forked from pool/xorg-x11-server
Stefan Dirsch
c8690bb170
This submit is just for preparing the final 13.0 release, please have a look at it and comment so i can fix things up until the final 13.0 release for 12.3! #3 OBS-URL: https://build.opensuse.org/request/show/131324 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=408
32 lines
1020 B
Diff
32 lines
1020 B
Diff
Index: xorg-server-1.12.1/hw/xnest/GCOps.c
|
|
===================================================================
|
|
--- xorg-server-1.12.1.orig/hw/xnest/GCOps.c
|
|
+++ xorg-server-1.12.1/hw/xnest/GCOps.c
|
|
@@ -94,15 +94,26 @@ xnestPutImage(DrawablePtr pDrawable, GCP
|
|
}
|
|
}
|
|
|
|
+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, char *pImage)
|
|
{
|
|
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;
|