mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-30 21:53:25 +00:00
Replace dixLookupResource by dixLookupResourceBy{Type,Class}
dixLookupResource attempted to automatically detect whether the caller wanted a lookup by-type or by-class, unfortunately, it guessed wrong for RT_NONE. Instead of trying to make the guess better, this patch just reverts the unification and creates separate functions for each operation.
This commit is contained in:
parent
0d9a42dc03
commit
f8dd80d13b
21 changed files with 161 additions and 94 deletions
|
|
@ -216,7 +216,7 @@ dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client,
|
|||
if (id == INVALID)
|
||||
return BadDrawable;
|
||||
|
||||
rc = dixLookupResource((pointer *)&pTmp, id, RC_DRAWABLE, client, access);
|
||||
rc = dixLookupResourceByClass((pointer *)&pTmp, id, RC_DRAWABLE, client, access);
|
||||
|
||||
if (rc == BadValue)
|
||||
return BadDrawable;
|
||||
|
|
@ -259,7 +259,7 @@ dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access)
|
|||
if (!clientIndex || !clients[clientIndex] || (rid & SERVER_BIT))
|
||||
goto bad;
|
||||
|
||||
rc = dixLookupResource(&pRes, rid, RC_ANY, client, DixGetAttrAccess);
|
||||
rc = dixLookupResourceByClass(&pRes, rid, RC_ANY, client, DixGetAttrAccess);
|
||||
if (rc != Success)
|
||||
goto bad;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue