aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext/saver.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xext/saver.c')
-rw-r--r--xorg-server/Xext/saver.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/xorg-server/Xext/saver.c b/xorg-server/Xext/saver.c
index 6afd79c34..43c110dac 100644
--- a/xorg-server/Xext/saver.c
+++ b/xorg-server/Xext/saver.c
@@ -472,9 +472,6 @@ CreateSaverWindow(ScreenPtr pScreen)
WindowPtr pWin;
int result;
unsigned long mask;
- Colormap *installedMaps;
- int numInstalled;
- int i;
Colormap wantMap;
ColormapPtr pCmap;
@@ -550,18 +547,7 @@ CreateSaverWindow(ScreenPtr pScreen)
/* check and install our own colormap if it isn't installed now */
wantMap = wColormap(pWin);
- if (wantMap == None)
- return TRUE;
- installedMaps = malloc(pScreen->maxInstalledCmaps * sizeof(Colormap));
- numInstalled = (*pWin->drawable.pScreen->ListInstalledColormaps)
- (pScreen, installedMaps);
- for (i = 0; i < numInstalled; i++)
- if (installedMaps[i] == wantMap)
- break;
-
- free((char *) installedMaps);
-
- if (i < numInstalled)
+ if (wantMap == None || IsMapInstalled(wantMap, pWin))
return TRUE;
result = dixLookupResourceByType((void **) &pCmap, wantMap, RT_COLORMAP,