archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / imlib / trunk / debian-bug448360.patch
blobf1c0ef1111dd567f2b5c0407a9f14e31b4617b6d
1 diff -up -ru imlib-1.9.15.orig/gdk_imlib/misc.c imlib-1.9.15/gdk_imlib/misc.c
2 --- imlib-1.9.15.orig/gdk_imlib/misc.c 2002-03-04 18:06:32.000000000 +0100
3 +++ imlib-1.9.15/gdk_imlib/misc.c 2007-10-28 14:00:04.000000000 +0100
4 @@ -674,6 +674,10 @@ gdk_imlib_init_params(GdkImlibInitParams
5 visual = gdk_rgb_get_visual();
6 id->x.visual = GDK_VISUAL_XVISUAL(visual); /* the visual type */
7 id->x.depth = visual->depth; /* the depth of the screen in bpp */
9 + id->x.shm = 0;
10 + id->x.shmp = 0;
11 + id->max_shm = 0;
12 #ifdef HAVE_SHM
13 if (XShmQueryExtension(id->x.disp))
15 @@ -689,17 +693,14 @@ gdk_imlib_init_params(GdkImlibInitParams
16 id->x.last_xim = NULL;
17 id->x.last_sxim = NULL;
18 id->max_shm = 0x7fffffff;
19 - if (XShmPixmapFormat(id->x.disp) == ZPixmap)
20 + if ((XShmPixmapFormat(id->x.disp) == ZPixmap) &&
21 + (pm == True))
22 id->x.shmp = 1;
26 - else
27 #endif
28 - {
29 - id->x.shm = 0;
30 - id->x.shmp = 0;
31 - }
33 id->cache.on_image = 0;
34 id->cache.size_image = 0;
35 id->cache.num_image = 0;
36 @@ -935,8 +936,8 @@ gdk_imlib_init_params(GdkImlibInitParams
38 if (p->flags & PARAMS_SHAREDPIXMAPS)
40 - if (id->x.shm)
41 - id->x.shmp = p->sharedpixmaps;
42 + if (!p->sharedpixmaps)
43 + id->x.shmp = 0;
45 if (p->flags & PARAMS_PALETTEOVERRIDE)
46 override = p->paletteoverride;
47 diff -up -ru imlib-1.9.15.orig/Imlib/misc.c imlib-1.9.15/Imlib/misc.c
48 --- imlib-1.9.15.orig/Imlib/misc.c 2004-09-21 02:22:59.000000000 +0200
49 +++ imlib-1.9.15/Imlib/misc.c 2007-10-28 14:00:23.000000000 +0100
50 @@ -675,6 +675,10 @@ Imlib_init_with_params(Display * disp, I
51 id->x.root = DefaultRootWindow(disp); /* the root window id */
52 id->x.visual = DefaultVisual(disp, id->x.screen); /* the visual type */
53 id->x.depth = DefaultDepth(disp, id->x.screen); /* the depth of the screen in bpp */
55 + id->x.shm = 0;
56 + id->x.shmp = 0;
57 + id->max_shm = 0;
58 #ifdef HAVE_SHM
59 if (XShmQueryExtension(id->x.disp))
61 @@ -690,17 +694,14 @@ Imlib_init_with_params(Display * disp, I
62 id->x.last_xim = NULL;
63 id->x.last_sxim = NULL;
64 id->max_shm = 0x7fffffff;
65 - if (XShmPixmapFormat(id->x.disp) == ZPixmap)
66 + if ((XShmPixmapFormat(id->x.disp) == ZPixmap &&
67 + (pm == True)))
68 id->x.shmp = 1;
72 - else
73 #endif
74 - {
75 - id->x.shm = 0;
76 - id->x.shmp = 0;
77 - }
79 id->cache.on_image = 0;
80 id->cache.size_image = 0;
81 id->cache.num_image = 0;
82 @@ -952,8 +953,8 @@ Imlib_init_with_params(Display * disp, I
84 if (p->flags & PARAMS_SHAREDPIXMAPS)
86 - if (id->x.shm)
87 - id->x.shmp = p->sharedpixmaps;
88 + if (!p->sharedpixmaps)
89 + id->x.shmp = 0;
91 if (p->flags & PARAMS_PALETTEOVERRIDE)
92 override = p->paletteoverride;