summaryrefslogtreecommitdiff
path: root/graphics/imlib2/patches/patch-ae
blob: ed9f53985affa0a38d10b40b60f278d7df1f5ed6 (plain)
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.5 2011/01/31 10:22:26 wiz Exp $

Use my_lround() on Interix too.

Add minimalist #ifndef blocks to rip out XShm support on Interix.

--- src/lib/ximage.c.orig	2004-11-01 04:39:42.000000000 -0500
+++ src/lib/ximage.c
@@ -81,8 +81,10 @@ __imlib_FlushXImage(Display * d)
 
                   xim = list_xim[i];
                   list_mem_use -= xim->bytes_per_line * xim->height;
+#ifndef __INTERIX
                   if (list_si[i])
                      XShmDetach(d, list_si[i]);
+#endif /* !__INTERIX */
                   XDestroyImage(xim);
                   if (list_si[i])
                     {
@@ -163,11 +165,13 @@ __imlib_ProduceXImage(Display * d, Visua
    /* if we havent check the shm extension before - see if its there */
    if (x_does_shm < 0)
      {
+#ifndef __INTERIX
         /* if its there set dose_xhm flag */
         if (XShmQueryExtension(d))
            x_does_shm = 1;
         /* clear the flag - no shm at all */
         else
+#endif
            x_does_shm = 0;
      }
    /* find a cached XImage (to avoid server to & fro) that is big enough */
@@ -219,6 +223,7 @@ __imlib_ProduceXImage(Display * d, Visua
 
    /* work on making a shared image */
    xim = NULL;
+#ifndef __INTERIX
    /* if the server does shm */
    if (x_does_shm)
      {
@@ -301,6 +306,7 @@ __imlib_ProduceXImage(Display * d, Visua
                }
           }
      }
+#endif /* !__INTERIX */
    /* ok if xim == NULL it all failed - fall back to XImages */
    if (!xim)
      {