summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2009-10-22 17:29:01 -0400
committerPeter Hutterer <peter.hutterer@who-t.net>2009-10-23 13:24:49 +1000
commit5085340be6e9ed1cbd80fc9d4bf8920161e70f64 (patch)
treebe55414a1e0b099f94c770871f28365608accbf2
parent23ca41f4c3a9cc54116b759615456a0496919f24 (diff)
dix: Fix up colormap fixup.
FindClientResourcesByType() will walk all colormaps on all screens; we only want to fix up the current screen. Otherwise, screens > 0 will have the visual pointers for their colormaps pointing off into space. Signed-off-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit 15b30fde179cba3877182cd51b0f870ef29ffaee)
-rw-r--r--dix/colormap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/dix/colormap.c b/dix/colormap.c
index d702b0204..bf9794125 100644
--- a/dix/colormap.c
+++ b/dix/colormap.c
@@ -2705,6 +2705,9 @@ static void _colormap_find_resource(pointer value, XID id,
ColormapPtr cmap = value;
int j;
+ if (pScreen != cmap->pScreen)
+ return;
+
j = cmap->pVisual - pScreen->visuals;
cmap->pVisual = &visuals[j];
}