1
0
xorg-x11-server/p_xnest-ignore-getimage-errors.diff
Stefan Dirsch ebdc01ee77 Accepting request 114753 from home:dimstar:branches:X11:XOrg
Udpate to Xorg 1.12.1... add 'automatic' ABI provides, which are verified during build to be true to ensure we can't ever publish a package which does not contain correct provides for the ABI

OBS-URL: https://build.opensuse.org/request/show/114753
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=383
2012-04-20 09:32:05 +00:00

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;