Fri Jul 24 03:57:21 2020 UTC ()
Use proper args for dixLookupResourceByType() to get defcolormap.

Botched in mechanical 1.20 updates.


(tsutsui)
diff -r1.2 -r1.3 xsrc/external/mit/xorg-server/dist/hw/sun/sunCfb.c

cvs diff -r1.2 -r1.3 xsrc/external/mit/xorg-server/dist/hw/sun/sunCfb.c (expand / switch to unified diff)

--- xsrc/external/mit/xorg-server/dist/hw/sun/sunCfb.c 2020/07/23 18:14:36 1.2
+++ xsrc/external/mit/xorg-server/dist/hw/sun/sunCfb.c 2020/07/24 03:57:21 1.3
@@ -187,27 +187,27 @@ sunInstallColormap(ColormapPtr cmap) @@ -187,27 +187,27 @@ sunInstallColormap(ColormapPtr cmap)
187 WalkTree(cmap->pScreen, TellGainedMap, (void *) &(cmap->mid)); 187 WalkTree(cmap->pScreen, TellGainedMap, (void *) &(cmap->mid));
188} 188}
189 189
190void 190void
191sunUninstallColormap(ColormapPtr cmap) 191sunUninstallColormap(ColormapPtr cmap)
192{ 192{
193 sunScreenPtr pPrivate = sunGetScreenPrivate(cmap->pScreen); 193 sunScreenPtr pPrivate = sunGetScreenPrivate(cmap->pScreen);
194 if (cmap == pPrivate->installedMap) { 194 if (cmap == pPrivate->installedMap) {
195 Colormap defMapID = cmap->pScreen->defColormap; 195 Colormap defMapID = cmap->pScreen->defColormap;
196 196
197 if (cmap->mid != defMapID) { 197 if (cmap->mid != defMapID) {
198 ColormapPtr defMap; 198 ColormapPtr defMap;
199 dixLookupResourceByType((void **)&defMap, defMapID, RT_COLORMAP, 199 dixLookupResourceByType((void **)&defMap, defMapID, RT_COLORMAP,
200 NullClient, DixUnknownAccess); 200 serverClient, DixUseAccess);
201 201
202 if (defMap) 202 if (defMap)
203 (*cmap->pScreen->InstallColormap)(defMap); 203 (*cmap->pScreen->InstallColormap)(defMap);
204 else 204 else
205 ErrorF("sunFbs: Can't find default colormap\n"); 205 ErrorF("sunFbs: Can't find default colormap\n");
206 } 206 }
207 } 207 }
208} 208}
209 209
210int 210int
211sunListInstalledColormaps(ScreenPtr pScreen, Colormap *pCmapList) 211sunListInstalledColormaps(ScreenPtr pScreen, Colormap *pCmapList)
212{ 212{
213 sunScreenPtr pPrivate = sunGetScreenPrivate(pScreen); 213 sunScreenPtr pPrivate = sunGetScreenPrivate(pScreen);