summaryrefslogtreecommitdiff
path: root/hw/xnest
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-05-28 17:20:58 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-05-28 17:20:58 +1000
commitd7aef3f663f4b5d861799f8615dcd301d5ce2906 (patch)
tree3a5ed1b3dc7e83536979578e3da99f2860f44b11 /hw/xnest
parenta25f248fc3bd0375d91ca8a44320200d445ecfbb (diff)
parente08c6a0752772745f35f7afcf6c2b1c927b91cc0 (diff)
Merge branch 'master' into xi2
Conflicts: Xext/geext.c Xi/chdevcur.c Xi/extgrbdev.c Xi/xiproperty.c configure.ac dix/ptrveloc.c hw/xfree86/common/xf86Config.c mi/mipointer.h test/input.c xkb/xkb.c
Diffstat (limited to 'hw/xnest')
-rw-r--r--hw/xnest/Color.c22
-rw-r--r--hw/xnest/Window.c9
2 files changed, 19 insertions, 12 deletions
diff --git a/hw/xnest/Color.c b/hw/xnest/Color.c
index 5ba0bdbad..dc749478f 100644
--- a/hw/xnest/Color.c
+++ b/hw/xnest/Color.c
@@ -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);
}
}
diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c
index ae3487f4a..48c870fac 100644
--- a/hw/xnest/Window.c
+++ b/hw/xnest/Window.c
@@ -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);