mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-23 01:29:58 +00:00
Fix most remaining deprecated resource lookups.
Callsites updated to use dixLookupResourceBy{Type,Class}.
TODO: Audit access modes to make sure they reflect the usage.
This commit is contained in:
parent
1abe0ee3da
commit
57aff88c7d
50 changed files with 1017 additions and 1037 deletions
|
|
@ -242,16 +242,16 @@ xnestSetInstalledColormapWindows(ScreenPtr pScreen)
|
|||
WindowPtr pWin;
|
||||
Visual *visual;
|
||||
ColormapPtr pCmap;
|
||||
|
||||
|
||||
pWin = xnestWindowPtr(icws.windows[0]);
|
||||
visual = xnestVisualFromID(pScreen, wVisual(pWin));
|
||||
|
||||
if (visual == xnestDefaultVisual(pScreen))
|
||||
pCmap = (ColormapPtr)LookupIDByType(wColormap(pWin),
|
||||
RT_COLORMAP);
|
||||
dixLookupResourceByType((pointer *)&pCmap, wColormap(pWin),
|
||||
RT_COLORMAP, serverClient, DixUseAccess);
|
||||
else
|
||||
pCmap = (ColormapPtr)LookupIDByType(pScreen->defColormap,
|
||||
RT_COLORMAP);
|
||||
dixLookupResourceByType((pointer *)&pCmap, pScreen->defColormap,
|
||||
RT_COLORMAP, serverClient, DixUseAccess);
|
||||
|
||||
XSetWindowColormap(xnestDisplay,
|
||||
xnestDefaultWindows[pScreen->myNum],
|
||||
|
|
@ -302,7 +302,8 @@ xnestDirectInstallColormaps(ScreenPtr pScreen)
|
|||
for (i = 0; i < n; i++) {
|
||||
ColormapPtr pCmap;
|
||||
|
||||
pCmap = (ColormapPtr)LookupIDByType(pCmapIDs[i], RT_COLORMAP);
|
||||
dixLookupResourceByType((pointer *)&pCmap, pCmapIDs[i], RT_COLORMAP,
|
||||
serverClient, DixInstallAccess);
|
||||
if (pCmap)
|
||||
XInstallColormap(xnestDisplay, xnestColormap(pCmap));
|
||||
}
|
||||
|
|
@ -321,7 +322,8 @@ xnestDirectUninstallColormaps(ScreenPtr pScreen)
|
|||
for (i = 0; i < n; i++) {
|
||||
ColormapPtr pCmap;
|
||||
|
||||
pCmap = (ColormapPtr)LookupIDByType(pCmapIDs[i], RT_COLORMAP);
|
||||
dixLookupResourceByType((pointer *)&pCmap, pCmapIDs[i], RT_COLORMAP,
|
||||
serverClient, DixUninstallAccess);
|
||||
if (pCmap)
|
||||
XUninstallColormap(xnestDisplay, xnestColormap(pCmap));
|
||||
}
|
||||
|
|
@ -365,8 +367,10 @@ xnestUninstallColormap(ColormapPtr pCmap)
|
|||
{
|
||||
if (pCmap->mid != pCmap->pScreen->defColormap)
|
||||
{
|
||||
pCurCmap = (ColormapPtr)LookupIDByType(pCmap->pScreen->defColormap,
|
||||
RT_COLORMAP);
|
||||
dixLookupResourceByType((pointer *)&pCurCmap,
|
||||
pCmap->pScreen->defColormap,
|
||||
RT_COLORMAP,
|
||||
serverClient, DixInstallAccess);
|
||||
(*pCmap->pScreen->InstallColormap)(pCurCmap);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,7 +93,8 @@ xnestCreateWindow(WindowPtr pWin)
|
|||
visual = xnestVisualFromID(pWin->drawable.pScreen, wVisual(pWin));
|
||||
mask |= CWColormap;
|
||||
if (pWin->optional->colormap) {
|
||||
pCmap = (ColormapPtr)LookupIDByType(wColormap(pWin), RT_COLORMAP);
|
||||
dixLookupResourceByType((pointer *)&pCmap, wColormap(pWin),
|
||||
RT_COLORMAP, serverClient, DixUseAccess);
|
||||
attributes.colormap = xnestColormap(pCmap);
|
||||
}
|
||||
else
|
||||
|
|
@ -104,7 +105,8 @@ xnestCreateWindow(WindowPtr pWin)
|
|||
}
|
||||
else { /* root windows have their own colormaps at creation time */
|
||||
visual = xnestVisualFromID(pWin->drawable.pScreen, wVisual(pWin));
|
||||
pCmap = (ColormapPtr)LookupIDByType(wColormap(pWin), RT_COLORMAP);
|
||||
dixLookupResourceByType((pointer *)&pCmap, wColormap(pWin),
|
||||
RT_COLORMAP, serverClient, DixUseAccess);
|
||||
mask |= CWColormap;
|
||||
attributes.colormap = xnestColormap(pCmap);
|
||||
}
|
||||
|
|
@ -338,7 +340,8 @@ xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
|
|||
if (mask & CWColormap) {
|
||||
ColormapPtr pCmap;
|
||||
|
||||
pCmap = (ColormapPtr)LookupIDByType(wColormap(pWin), RT_COLORMAP);
|
||||
dixLookupResourceByType((pointer *)&pCmap, wColormap(pWin), RT_COLORMAP,
|
||||
serverClient, DixUseAccess);
|
||||
|
||||
attributes.colormap = xnestColormap(pCmap);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue