summaryrefslogtreecommitdiff
path: root/Xext/saver.c
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2006-12-15 16:36:29 -0500
committerEamon Walsh <ewalsh@moss-huskies.epoch.ncsc.mil>2006-12-15 16:36:29 -0500
commit10aabb729d1586db344f9c1abdf1cf45e7ddaa7a (patch)
tree4c601a4b49253dec98d4d6d4364c9f61fb30dcc0 /Xext/saver.c
parent25d5e0a629f82d95bd71daf9a920a70e095b5188 (diff)
Convert callers of LookupDrawable() to dixLookupDrawable().
Diffstat (limited to 'Xext/saver.c')
-rw-r--r--Xext/saver.c36
1 files changed, 20 insertions, 16 deletions
diff --git a/Xext/saver.c b/Xext/saver.c
index d6b537a78..7e3ebf408 100644
--- a/Xext/saver.c
+++ b/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)
{