Convert callers of LookupDrawable() to dixLookupDrawable().
This commit is contained in:
10
Xext/mbuf.c
10
Xext/mbuf.c
@@ -786,15 +786,15 @@ ProcGetBufferInfo (client)
|
||||
DrawablePtr pDrawable;
|
||||
xMbufGetBufferInfoReply rep;
|
||||
ScreenPtr pScreen;
|
||||
int i, j, k;
|
||||
int n;
|
||||
int i, j, k, n, rc;
|
||||
xMbufBufferInfo *pInfo;
|
||||
int nInfo;
|
||||
DepthPtr pDepth;
|
||||
|
||||
pDrawable = (DrawablePtr) LookupDrawable (stuff->drawable, client);
|
||||
if (!pDrawable)
|
||||
return BadDrawable;
|
||||
rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0,
|
||||
DixUnknownAccess);
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
pScreen = pDrawable->pScreen;
|
||||
nInfo = 0;
|
||||
for (i = 0; i < pScreen->numDepths; i++)
|
||||
|
||||
36
Xext/saver.c
36
Xext/saver.c
@@ -780,16 +780,17 @@ ProcScreenSaverQueryInfo (client)
|
||||
{
|
||||
REQUEST(xScreenSaverQueryInfoReq);
|
||||
xScreenSaverQueryInfoReply rep;
|
||||
register int n;
|
||||
register int n, rc;
|
||||
ScreenSaverStuffPtr pSaver;
|
||||
DrawablePtr pDraw;
|
||||
CARD32 lastInput;
|
||||
ScreenSaverScreenPrivatePtr pPriv;
|
||||
|
||||
REQUEST_SIZE_MATCH (xScreenSaverQueryInfoReq);
|
||||
pDraw = (DrawablePtr) LookupDrawable (stuff->drawable, client);
|
||||
if (!pDraw)
|
||||
return BadDrawable;
|
||||
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
|
||||
DixUnknownAccess);
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
|
||||
pSaver = &savedScreenInfo[pDraw->pScreen->myNum];
|
||||
pPriv = GetScreenPrivate (pDraw->pScreen);
|
||||
@@ -852,11 +853,13 @@ ProcScreenSaverSelectInput (client)
|
||||
{
|
||||
REQUEST(xScreenSaverSelectInputReq);
|
||||
DrawablePtr pDraw;
|
||||
int rc;
|
||||
|
||||
REQUEST_SIZE_MATCH (xScreenSaverSelectInputReq);
|
||||
pDraw = (DrawablePtr) LookupDrawable (stuff->drawable, client);
|
||||
if (!pDraw)
|
||||
return BadDrawable;
|
||||
rc = dixLookupDrawable (&pDraw, stuff->drawable, client, 0,
|
||||
DixUnknownAccess);
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
if (!setEventMask (pDraw->pScreen, client, stuff->eventMask))
|
||||
return BadAlloc;
|
||||
return Success;
|
||||
@@ -871,9 +874,7 @@ ScreenSaverSetAttributes (ClientPtr client)
|
||||
ScreenPtr pScreen;
|
||||
ScreenSaverScreenPrivatePtr pPriv = 0;
|
||||
ScreenSaverAttrPtr pAttr = 0;
|
||||
int ret;
|
||||
int len;
|
||||
int class, bw, depth;
|
||||
int ret, len, class, bw, depth;
|
||||
unsigned long visual;
|
||||
int idepth, ivisual;
|
||||
Bool fOK;
|
||||
@@ -891,9 +892,10 @@ ScreenSaverSetAttributes (ClientPtr client)
|
||||
ColormapPtr pCmap;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE (xScreenSaverSetAttributesReq);
|
||||
pDraw = (DrawablePtr) LookupDrawable (stuff->drawable, client);
|
||||
if (!pDraw)
|
||||
return BadDrawable;
|
||||
ret = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
|
||||
DixUnknownAccess);
|
||||
if (ret != Success)
|
||||
return ret;
|
||||
pScreen = pDraw->pScreen;
|
||||
pParent = WindowTable[pScreen->myNum];
|
||||
|
||||
@@ -1246,11 +1248,13 @@ ScreenSaverUnsetAttributes (ClientPtr client)
|
||||
REQUEST(xScreenSaverSetAttributesReq);
|
||||
DrawablePtr pDraw;
|
||||
ScreenSaverScreenPrivatePtr pPriv;
|
||||
int rc;
|
||||
|
||||
REQUEST_SIZE_MATCH (xScreenSaverUnsetAttributesReq);
|
||||
pDraw = (DrawablePtr) LookupDrawable (stuff->drawable, client);
|
||||
if (!pDraw)
|
||||
return BadDrawable;
|
||||
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
|
||||
DixUnknownAccess);
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
pPriv = GetScreenPrivate (pDraw->pScreen);
|
||||
if (pPriv && pPriv->attr && pPriv->attr->client == client)
|
||||
{
|
||||
|
||||
@@ -1944,8 +1944,11 @@ ProcXpPutDocumentData(ClientPtr client)
|
||||
if (stuff->drawable) {
|
||||
if (pContext->state & DOC_RAW_STARTED)
|
||||
return BadDrawable;
|
||||
pDraw = (DrawablePtr)LookupDrawable(stuff->drawable, client);
|
||||
if (!pDraw || pDraw->pScreen->myNum != pContext->screenNum)
|
||||
result = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
|
||||
DixUnknownAccess);
|
||||
if (result != Success)
|
||||
return result;
|
||||
if (pDraw->pScreen->myNum != pContext->screenNum)
|
||||
return BadDrawable;
|
||||
} else {
|
||||
if (pContext->state & DOC_COOKED_STARTED)
|
||||
|
||||
Reference in New Issue
Block a user