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 15b30fde17)
This commit is contained in:
Adam Jackson 2009-10-22 17:29:01 -04:00 committed by Peter Hutterer
parent 23ca41f4c3
commit 5085340be6
1 changed files with 3 additions and 0 deletions

View File

@ -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];
}