aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/fb
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-05-04 07:14:28 +0000
committermarha <marha@users.sourceforge.net>2010-05-04 07:14:28 +0000
commit650d418382eae64ce37765c1fbe2693a6c255ddc (patch)
treea67abd860ca75099f529fd66668f9bb86ace7370 /xorg-server/fb
parent567e9524c7a2fdabade9cdbb672a55f6a417ce15 (diff)
downloadvcxsrv-650d418382eae64ce37765c1fbe2693a6c255ddc.tar.gz
vcxsrv-650d418382eae64ce37765c1fbe2693a6c255ddc.tar.bz2
vcxsrv-650d418382eae64ce37765c1fbe2693a6c255ddc.zip
xserver git update 4/5/2010
Diffstat (limited to 'xorg-server/fb')
-rw-r--r--xorg-server/fb/fbcmap.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/xorg-server/fb/fbcmap.c b/xorg-server/fb/fbcmap.c
index 2ff3234b5..b775bc335 100644
--- a/xorg-server/fb/fbcmap.c
+++ b/xorg-server/fb/fbcmap.c
@@ -36,16 +36,18 @@
#error "You should be compiling fbcmap_mi.c instead of fbcmap.c!"
#endif
+static int cmapScrPrivateKeyIndex;
+static DevPrivateKey cmapScrPrivateKey = &cmapScrPrivateKeyIndex;
-
-ColormapPtr FbInstalledMaps[MAXSCREENS];
+#define GetInstalledColormap(s) ((ColormapPtr) dixLookupPrivate(&(s)->devPrivates, cmapScrPrivateKey))
+#define SetInstalledColormap(s,c) (dixSetPrivate(&(s)->devPrivates, cmapScrPrivateKey, c))
int
fbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps)
{
/* By the time we are processing requests, we can guarantee that there
* is always a colormap installed */
- *pmaps = FbInstalledMaps[pScreen->myNum]->mid;
+ *pmaps = GetInstalledColormap(pScreen)->mid;
return (1);
}
@@ -53,8 +55,7 @@ fbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps)
void
fbInstallColormap(ColormapPtr pmap)
{
- int index = pmap->pScreen->myNum;
- ColormapPtr oldpmap = FbInstalledMaps[index];
+ ColormapPtr oldpmap = GetInstalledColormap(pmap->pScreen);
if(pmap != oldpmap)
{
@@ -63,7 +64,7 @@ fbInstallColormap(ColormapPtr pmap)
if(oldpmap != (ColormapPtr)None)
WalkTree(pmap->pScreen, TellLostMap, (char *)&oldpmap->mid);
/* Install pmap */
- FbInstalledMaps[index] = pmap;
+ SetInstalledColormap(pmap->pScreen, pmap);
WalkTree(pmap->pScreen, TellGainedMap, (char *)&pmap->mid);
}
}
@@ -71,8 +72,7 @@ fbInstallColormap(ColormapPtr pmap)
void
fbUninstallColormap(ColormapPtr pmap)
{
- int index = pmap->pScreen->myNum;
- ColormapPtr curpmap = FbInstalledMaps[index];
+ ColormapPtr curpmap = GetInstalledColormap(pmap->pScreen);
if(pmap == curpmap)
{