diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2009-04-29 01:04:37 -0400 |
---|---|---|
committer | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2009-04-29 01:04:37 -0400 |
commit | 57aff88c7d0761e590806d07bee1c9410680c89f (patch) | |
tree | 48f05f58a72183556af3b0a7f3f286959d7e096a /randr/rroutput.c | |
parent | 1abe0ee3da5e1268c7315f841d31337ea6524cf0 (diff) |
Fix most remaining deprecated resource lookups.
Callsites updated to use dixLookupResourceBy{Type,Class}.
TODO: Audit access modes to make sure they reflect the usage.
Diffstat (limited to 'randr/rroutput.c')
-rw-r--r-- | randr/rroutput.c | 37 |
1 files changed, 10 insertions, 27 deletions
diff --git a/randr/rroutput.c b/randr/rroutput.c index 0ae7873e2..127497eb8 100644 --- a/randr/rroutput.c +++ b/randr/rroutput.c @@ -448,13 +448,7 @@ ProcRRGetOutputInfo (ClientPtr client) int i, n; REQUEST_SIZE_MATCH(xRRGetOutputInfoReq); - output = LookupOutput(client, stuff->output, DixReadAccess); - - if (!output) - { - client->errorValue = stuff->output; - return RRErrorBase + BadRROutput; - } + VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess); pScreen = output->pScreen; pScrPriv = rrGetScrPriv(pScreen); @@ -569,24 +563,16 @@ ProcRRSetOutputPrimary(ClientPtr client) RROutputPtr output = NULL; WindowPtr pWin; rrScrPrivPtr pScrPriv; + int rc; REQUEST_SIZE_MATCH(xRRSetOutputPrimaryReq); - pWin = SecurityLookupIDByType(client, stuff->window, RT_WINDOW, - DixReadAccess); - - if (!pWin) { - client->errorValue = stuff->window; - return BadWindow; - } + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); + if (rc != Success) + return rc; if (stuff->output) { - output = LookupOutput(client, stuff->output, DixReadAccess); - - if (!output) { - client->errorValue = stuff->output; - return RRErrorBase + BadRROutput; - } + VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess); if (output->pScreen != pWin->drawable.pScreen) { client->errorValue = stuff->window; @@ -608,16 +594,13 @@ ProcRRGetOutputPrimary(ClientPtr client) rrScrPrivPtr pScrPriv; xRRGetOutputPrimaryReply rep; RROutputPtr primary = NULL; + int rc; REQUEST_SIZE_MATCH(xRRGetOutputPrimaryReq); - pWin = SecurityLookupIDByType(client, stuff->window, RT_WINDOW, - DixReadAccess); - - if (!pWin) { - client->errorValue = stuff->window; - return BadWindow; - } + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); + if (rc != Success) + return rc; pScrPriv = rrGetScrPriv(pWin->drawable.pScreen); if (pScrPriv) |