Magellan Linux

Annotation of /trunk/imlib/patches/imlib-1.9.15-fix-rendering.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1038 - (hide annotations) (download)
Tue May 4 17:10:47 2010 UTC (14 years, 1 month ago) by niro
File size: 3263 byte(s)
fix rendering issues with EXA enabled

1 niro 1038 Michel Dänzer <daenzer AT debian.org>
2    
3     * The boolean value returned via the last parameter to XShmQueryVersion()
4     isn't honoured everywhere.
5     * The init functions that take parameters allow the caller to enable shared
6     pixmaps when they aren't supported (or disabled by configuration files).
7    
8    
9     These result in incorrect rendering when the MIT-SHM extension doesn't support
10     shared pixmaps, e.g. using EXA with current versions of Xorg.
11    
12     http://bugs.gentoo.org/show_bug.cgi?id=197489
13    
14     diff -up -ru imlib-1.9.15.orig/gdk_imlib/misc.c imlib-1.9.15/gdk_imlib/misc.c
15     --- imlib-1.9.15.orig/gdk_imlib/misc.c 2002-03-04 18:06:32.000000000 +0100
16     +++ imlib-1.9.15/gdk_imlib/misc.c 2007-10-28 14:00:04.000000000 +0100
17     @@ -674,6 +674,10 @@ gdk_imlib_init_params(GdkImlibInitParams
18     visual = gdk_rgb_get_visual();
19     id->x.visual = GDK_VISUAL_XVISUAL(visual); /* the visual type */
20     id->x.depth = visual->depth; /* the depth of the screen in bpp */
21     +
22     + id->x.shm = 0;
23     + id->x.shmp = 0;
24     + id->max_shm = 0;
25     #ifdef HAVE_SHM
26     if (XShmQueryExtension(id->x.disp))
27     {
28     @@ -689,17 +693,14 @@ gdk_imlib_init_params(GdkImlibInitParams
29     id->x.last_xim = NULL;
30     id->x.last_sxim = NULL;
31     id->max_shm = 0x7fffffff;
32     - if (XShmPixmapFormat(id->x.disp) == ZPixmap)
33     + if ((XShmPixmapFormat(id->x.disp) == ZPixmap) &&
34     + (pm == True))
35     id->x.shmp = 1;
36     }
37     }
38     }
39     - else
40     #endif
41     - {
42     - id->x.shm = 0;
43     - id->x.shmp = 0;
44     - }
45     +
46     id->cache.on_image = 0;
47     id->cache.size_image = 0;
48     id->cache.num_image = 0;
49     @@ -935,8 +936,8 @@ gdk_imlib_init_params(GdkImlibInitParams
50     }
51     if (p->flags & PARAMS_SHAREDPIXMAPS)
52     {
53     - if (id->x.shm)
54     - id->x.shmp = p->sharedpixmaps;
55     + if (!p->sharedpixmaps)
56     + id->x.shmp = 0;
57     }
58     if (p->flags & PARAMS_PALETTEOVERRIDE)
59     override = p->paletteoverride;
60     diff -up -ru imlib-1.9.15.orig/Imlib/misc.c imlib-1.9.15/Imlib/misc.c
61     --- imlib-1.9.15.orig/Imlib/misc.c 2004-09-21 02:22:59.000000000 +0200
62     +++ imlib-1.9.15/Imlib/misc.c 2007-10-28 14:00:23.000000000 +0100
63     @@ -675,6 +675,10 @@ Imlib_init_with_params(Display * disp, I
64     id->x.root = DefaultRootWindow(disp); /* the root window id */
65     id->x.visual = DefaultVisual(disp, id->x.screen); /* the visual type */
66     id->x.depth = DefaultDepth(disp, id->x.screen); /* the depth of the screen in bpp */
67     +
68     + id->x.shm = 0;
69     + id->x.shmp = 0;
70     + id->max_shm = 0;
71     #ifdef HAVE_SHM
72     if (XShmQueryExtension(id->x.disp))
73     {
74     @@ -690,17 +694,14 @@ Imlib_init_with_params(Display * disp, I
75     id->x.last_xim = NULL;
76     id->x.last_sxim = NULL;
77     id->max_shm = 0x7fffffff;
78     - if (XShmPixmapFormat(id->x.disp) == ZPixmap)
79     + if ((XShmPixmapFormat(id->x.disp) == ZPixmap &&
80     + (pm == True)))
81     id->x.shmp = 1;
82     }
83     }
84     }
85     - else
86     #endif
87     - {
88     - id->x.shm = 0;
89     - id->x.shmp = 0;
90     - }
91     +
92     id->cache.on_image = 0;
93     id->cache.size_image = 0;
94     id->cache.num_image = 0;
95     @@ -952,8 +953,8 @@ Imlib_init_with_params(Display * disp, I
96     }
97     if (p->flags & PARAMS_SHAREDPIXMAPS)
98     {
99     - if (id->x.shm)
100     - id->x.shmp = p->sharedpixmaps;
101     + if (!p->sharedpixmaps)
102     + id->x.shmp = 0;
103     }
104     if (p->flags & PARAMS_PALETTEOVERRIDE)
105     override = p->paletteoverride;