summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyril Brulebois <kibi@debian.org>2010-11-11 15:40:13 +0100
committerCyril Brulebois <kibi@debian.org>2010-12-07 18:42:44 +0100
commit838b9582280030a159878af566126cb0a523ec29 (patch)
tree0fbd45edbe692d06cbb6fcc6bc40781191881d85
parentffb93533fd8067c7383aef5e0018a197af59b46c (diff)
Replace LookupIDByType() with dixLookupResourceByType(), take 2.
These occurrences are a bit harder to catch through a semantic patch, so process them “manually”. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Cyril Brulebois <kibi@debian.org>
-rw-r--r--hw/dmx/dmxgcops.c6
-rw-r--r--hw/dmx/glxProxy/glxcmds.c10
-rw-r--r--hw/dmx/glxProxy/glxext.c6
3 files changed, 17 insertions, 5 deletions
diff --git a/hw/dmx/dmxgcops.c b/hw/dmx/dmxgcops.c
index 425aa7c96..bc8cd9edc 100644
--- a/hw/dmx/dmxgcops.c
+++ b/hw/dmx/dmxgcops.c
@@ -523,8 +523,10 @@ static DMXScreenInfo *dmxFindAlternatePixmap(DrawablePtr pDrawable, XID *draw)
if (noPanoramiXExtension) return NULL;
if (pDrawable->type != DRAWABLE_PIXMAP) return NULL;
-
- if (!(pXinPix = (PanoramiXRes *)LookupIDByType(pDrawable->id, XRT_PIXMAP)))
+
+ if (Success != dixLookupResourceByType((pointer*) &pXinPix,
+ pDrawable->id, XRT_PIXMAP,
+ NullClient, DixUnknownAccess))
return NULL;
for (i = 1; i < PanoramiXNumScreens; i++) {
diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index 050d1e3fe..4e2e62fa6 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -2897,6 +2897,7 @@ int __glXCreateWindow(__GLXclientState *cl, GLbyte *pc)
VisualPtr pVisual;
VisualID visId;
int i, rc;
+ pointer val;
/*
** Check if windowId is valid
@@ -2962,7 +2963,9 @@ int __glXCreateWindow(__GLXclientState *cl, GLbyte *pc)
/*
** Check if there is already a fbconfig associated with this window
*/
- if ( LookupIDByType(glxwindowId, __glXWindowRes) ) {
+ if (Success == dixLookupResourceByType(&val,
+ glxwindowId, __glXWindowRes,
+ NullClient, DixUnknownAccess)) {
client->errorValue = glxwindowId;
return BadAlloc;
}
@@ -2994,11 +2997,14 @@ int __glXDestroyWindow(__GLXclientState *cl, GLbyte *pc)
ClientPtr client = cl->client;
xGLXDestroyWindowReq *req = (xGLXDestroyWindowReq *) pc;
XID glxwindow = req->glxwindow;
+ pointer val;
/*
** Check if it's a valid GLX window.
*/
- if (!LookupIDByType(glxwindow, __glXWindowRes)) {
+ if (Success != dixLookupResourceByType(&val,
+ glxwindow, __glXWindowRes,
+ NullClient, DixUnknownAccess)) {
client->errorValue = glxwindow;
return __glXBadDrawable;
}
diff --git a/hw/dmx/glxProxy/glxext.c b/hw/dmx/glxProxy/glxext.c
index 886b317c6..7f63b6b0b 100644
--- a/hw/dmx/glxProxy/glxext.c
+++ b/hw/dmx/glxProxy/glxext.c
@@ -186,8 +186,12 @@ void __glXFreeGLXWindow(__glXWindow *pGlxWindow)
{
if (!pGlxWindow->idExists && !pGlxWindow->refcnt) {
WindowPtr pWindow = (WindowPtr) pGlxWindow->pDraw;
+ WindowPtr ret;
- if (LookupIDByType(pWindow->drawable.id, RT_WINDOW) == pWindow) {
+ dixLookupResourceByType((pointer) &ret,
+ pWindow->drawable.id, RT_WINDOW,
+ NullClient, DixUnknownAccess);
+ if (ret == pWindow) {
(*pGlxWindow->pScreen->DestroyWindow)(pWindow);
}