aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/fb
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-05-05 09:43:03 +0000
committermarha <marha@users.sourceforge.net>2010-05-05 09:43:03 +0000
commit0874ae23a16946781dd517cfdb011c691ad0b581 (patch)
tree8de31864935e96a5e59b9fe6ceb12390bbc474cd /xorg-server/fb
parentd059ebdcb012228102f0b64f8cddf9464d5b625a (diff)
downloadvcxsrv-0874ae23a16946781dd517cfdb011c691ad0b581.tar.gz
vcxsrv-0874ae23a16946781dd517cfdb011c691ad0b581.tar.bz2
vcxsrv-0874ae23a16946781dd517cfdb011c691ad0b581.zip
svn merge -r571:HEAD "^/branches/released" .
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)
{