1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
$NetBSD: patch-ae,v 1.6 2011/05/18 10:04:26 drochner Exp $
Add minimalist #ifndef blocks to rip out XShm support on Interix.
--- src/lib/ximage.c.orig 2010-05-05 18:25:50.000000000 +0000
+++ src/lib/ximage.c
@@ -36,11 +36,13 @@ TmpXError(Display * d, XErrorEvent * ev)
void
__imlib_ShmCheck(Display * d)
{
+#ifndef __INTERIX
/* if its there set x_does_shm flag */
if (XShmQueryExtension(d))
x_does_shm = 2; /* 2: __imlib_ShmGetXImage tests first XShmAttach */
/* clear the flag - no shm at all */
else
+#endif /* !__INTERIX */
x_does_shm = 0;
}
@@ -185,11 +187,13 @@ __imlib_FlushXImage(Display * d)
xim = list_xim[i];
list_mem_use -= xim->bytes_per_line * xim->height;
+#ifndef __INTERIX
if (list_si[i])
{
__imlib_ShmDetach(d, list_si[i]);
free(list_si[i]);
}
+#endif /* !__INTERIX */
XDestroyImage(xim);
list_num--;
for (j = i; j < list_num; j++)
@@ -316,12 +320,14 @@ __imlib_ProduceXImage(Display * d, Visua
/* work on making a shared image */
xim = NULL;
+#ifndef __INTERIX
/* if the server does shm */
if (x_does_shm)
{
xim = __imlib_ShmGetXImage(d, v, None, depth, 0, 0, w, h,
list_si[list_num - 1]);
}
+#endif /* !__INTERIX */
/* ok if xim == NULL it all failed - fall back to XImages */
if (xim)
{
|