summaryrefslogtreecommitdiff
path: root/randr
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2006-12-15 15:50:46 -0500
committerEamon Walsh <ewalsh@moss-huskies.epoch.ncsc.mil>2006-12-15 15:50:46 -0500
commit25d5e0a629f82d95bd71daf9a920a70e095b5188 (patch)
treedece82b2dbb04f9810f37f8647eb1de1c2a85baa /randr
parent04c721854fbf1bd6379c165a53fab2bdc09961c0 (diff)
Convert callers of SecurityLookupWindow() to dixLookupWindow().
Diffstat (limited to 'randr')
-rw-r--r--randr/rrdispatch.c7
-rw-r--r--randr/rrscreen.c40
2 files changed, 20 insertions, 27 deletions
diff --git a/randr/rrdispatch.c b/randr/rrdispatch.c
index b1ec68b83..7f98965a4 100644
--- a/randr/rrdispatch.c
+++ b/randr/rrdispatch.c
@@ -70,11 +70,12 @@ ProcRRSelectInput (ClientPtr client)
WindowPtr pWin;
RREventPtr pRREvent, *pHead;
XID clientResource;
+ int rc;
REQUEST_SIZE_MATCH(xRRSelectInputReq);
- pWin = SecurityLookupWindow (stuff->window, client, DixWriteAccess);
- if (!pWin)
- return BadWindow;
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess);
+ if (rc != Success)
+ return rc;
pHead = (RREventPtr *)SecurityLookupIDByType(client,
pWin->drawable.id, RREventType,
DixWriteAccess);
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index f1d8fc5d9..6f7afaf7a 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -217,13 +217,12 @@ ProcRRGetScreenSizeRange (ClientPtr client)
WindowPtr pWin;
ScreenPtr pScreen;
rrScrPrivPtr pScrPriv;
+ int rc;
REQUEST_SIZE_MATCH(xRRGetScreenInfoReq);
- pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
- DixReadAccess);
-
- if (!pWin)
- return BadWindow;
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess);
+ if (rc != Success)
+ return rc;
pScreen = pWin->drawable.pScreen;
pScrPriv = rrGetScrPriv(pScreen);
@@ -268,14 +267,12 @@ ProcRRSetScreenSize (ClientPtr client)
WindowPtr pWin;
ScreenPtr pScreen;
rrScrPrivPtr pScrPriv;
- int i;
+ int i, rc;
REQUEST_SIZE_MATCH(xRRSetScreenSizeReq);
- pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
- DixReadAccess);
-
- if (!pWin)
- return BadWindow;
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess);
+ if (rc != Success)
+ return rc;
pScreen = pWin->drawable.pScreen;
pScrPriv = rrGetScrPriv(pScreen);
@@ -336,19 +333,16 @@ ProcRRGetScreenResources (ClientPtr client)
rrScrPrivPtr pScrPriv;
CARD8 *extra;
unsigned long extraLen;
- int i;
+ int i, n, rc;
RRCrtc *crtcs;
RROutput *outputs;
xRRModeInfo *modeinfos;
CARD8 *names;
- int n;
REQUEST_SIZE_MATCH(xRRGetScreenResourcesReq);
- pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
- DixReadAccess);
-
- if (!pWin)
- return BadWindow;
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess);
+ if (rc != Success)
+ return rc;
pScreen = pWin->drawable.pScreen;
pScrPriv = rrGetScrPriv(pScreen);
@@ -580,7 +574,7 @@ ProcRRGetScreenInfo (ClientPtr client)
REQUEST(xRRGetScreenInfoReq);
xRRGetScreenInfoReply rep;
WindowPtr pWin;
- int n;
+ int n, rc;
ScreenPtr pScreen;
rrScrPrivPtr pScrPriv;
CARD8 *extra;
@@ -588,11 +582,9 @@ ProcRRGetScreenInfo (ClientPtr client)
RROutputPtr output;
REQUEST_SIZE_MATCH(xRRGetScreenInfoReq);
- pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
- DixReadAccess);
-
- if (!pWin)
- return BadWindow;
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess);
+ if (rc != Success)
+ return rc;
pScreen = pWin->drawable.pScreen;
pScrPriv = rrGetScrPriv(pScreen);