Commit ace3d2d8 authored by Ulrich Sibiller's avatar Ulrich Sibiller

Colormap.c: save some lines

parent fae611c9
...@@ -296,12 +296,10 @@ void nxagentSetInstalledColormapWindows(ScreenPtr pScreen) ...@@ -296,12 +296,10 @@ void nxagentSetInstalledColormapWindows(ScreenPtr pScreen)
*/ */
if (icws.numWindows) if (icws.numWindows)
{ {
WindowPtr pWin;
Visual *visual;
ColormapPtr pCmap; ColormapPtr pCmap;
pWin = nxagentWindowPtr(icws.windows[0]); WindowPtr pWin = nxagentWindowPtr(icws.windows[0]);
visual = nxagentVisualFromID(pScreen, wVisual(pWin)); Visual *visual = nxagentVisualFromID(pScreen, wVisual(pWin));
if (visual == nxagentDefaultVisual(pScreen)) if (visual == nxagentDefaultVisual(pScreen))
pCmap = (ColormapPtr)LookupIDByType(wColormap(pWin), pCmap = (ColormapPtr)LookupIDByType(wColormap(pWin),
...@@ -380,9 +378,7 @@ void nxagentDirectUninstallColormaps(ScreenPtr pScreen) ...@@ -380,9 +378,7 @@ void nxagentDirectUninstallColormaps(ScreenPtr pScreen)
int n = (*pScreen->ListInstalledColormaps)(pScreen, pCmapIDs); int n = (*pScreen->ListInstalledColormaps)(pScreen, pCmapIDs);
for (int i = 0; i < n; i++) { for (int i = 0; i < n; i++) {
ColormapPtr pCmap; ColormapPtr pCmap = (ColormapPtr)LookupIDByType(pCmapIDs[i], RT_COLORMAP);
pCmap = (ColormapPtr)LookupIDByType(pCmapIDs[i], RT_COLORMAP);
if (pCmap) if (pCmap)
XUninstallColormap(nxagentDisplay, nxagentColormap(pCmap)); XUninstallColormap(nxagentDisplay, nxagentColormap(pCmap));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment