diff options
Diffstat (limited to 'graphics/imlib2/patches/patch-ac')
-rw-r--r-- | graphics/imlib2/patches/patch-ac | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/graphics/imlib2/patches/patch-ac b/graphics/imlib2/patches/patch-ac new file mode 100644 index 00000000000..57f8b9a9848 --- /dev/null +++ b/graphics/imlib2/patches/patch-ac @@ -0,0 +1,71 @@ +$NetBSD: patch-ac,v 1.4 2005/11/04 20:11:47 tv Exp $ + +--- src/lib/grab.c.orig 2004-11-01 04:39:42.000000000 -0500 ++++ src/lib/grab.c +@@ -412,7 +412,9 @@ __imlib_GrabDrawableToRGBA(DATA32 * data + int i; + int src_x, src_y, src_w, src_h, origw, origh; + int width, height, clipx, clipy; ++#ifndef __INTERIX + XShmSegmentInfo shminfo, mshminfo; ++#endif /* !__INTERIX */ + XImage *xim = NULL, *mxim = NULL; + static signed char x_does_shm = -1; + XColor cols[256]; +@@ -545,14 +547,17 @@ __imlib_GrabDrawableToRGBA(DATA32 * data + /* Create an Ximage (shared or not) */ + if (x_does_shm < 0) + { ++#ifndef __INTERIX + if (XShmQueryExtension(d)) + x_does_shm = 1; + else ++#endif /* !__INTERIX */ + x_does_shm = 0; + } + + prev_erh = XSetErrorHandler((XErrorHandler) Tmp_HandleXError); + ++#ifndef __INTERIX + if (x_does_shm) + { + _x_err = 0; +@@ -599,12 +604,14 @@ __imlib_GrabDrawableToRGBA(DATA32 * data + } + } + } ++#endif /* !__INTERIX */ + if (!is_shm) + xim = XGetImage(d, p, x, y, w, h, 0xffffffff, ZPixmap); + + if ((m) && (domask)) + { + _x_err = 0; ++#ifndef __INTERIX + if (x_does_shm) + { + mxim = XShmCreateImage(d, v, 1, ZPixmap, NULL, &mshminfo, w, h); +@@ -652,6 +659,7 @@ __imlib_GrabDrawableToRGBA(DATA32 * data + } + } + } ++#endif /* !__INTERIX */ + if (!is_mshm) + mxim = XGetImage(d, m, 0, 0, w, h, 0xffffffff, ZPixmap); + } +@@ -705,6 +713,7 @@ __imlib_GrabDrawableToRGBA(DATA32 * data + d, xim, mxim, v, xatt.depth, x, y, w, h, 0); + + /* destroy the Ximage */ ++#ifndef __INTERIX + if (is_shm) + { + XSync(d, False); +@@ -718,6 +727,7 @@ __imlib_GrabDrawableToRGBA(DATA32 * data + shmdt(mshminfo.shmaddr); + shmctl(mshminfo.shmid, IPC_RMID, 0); + } ++#endif /* !__INTERIX */ + XDestroyImage(xim); + if (created_mask) + XFreePixmap(d, m); |