mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-01 22:03:09 +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
8
dix/gc.c
8
dix/gc.c
|
|
@ -273,7 +273,7 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
|
|||
else
|
||||
{
|
||||
NEXTVAL(XID, newpix);
|
||||
rc = dixLookupResource((pointer *)&pPixmap, newpix,
|
||||
rc = dixLookupResourceByType((pointer *)&pPixmap, newpix,
|
||||
RT_PIXMAP, client, DixReadAccess);
|
||||
}
|
||||
if (rc == Success)
|
||||
|
|
@ -310,7 +310,7 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
|
|||
else
|
||||
{
|
||||
NEXTVAL(XID, newstipple)
|
||||
rc = dixLookupResource((pointer *)&pPixmap, newstipple,
|
||||
rc = dixLookupResourceByType((pointer *)&pPixmap, newstipple,
|
||||
RT_PIXMAP, client, DixReadAccess);
|
||||
}
|
||||
if (rc == Success)
|
||||
|
|
@ -353,7 +353,7 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
|
|||
else
|
||||
{
|
||||
NEXTVAL(XID, newfont)
|
||||
rc = dixLookupResource((pointer *)&pFont, newfont,
|
||||
rc = dixLookupResourceByType((pointer *)&pFont, newfont,
|
||||
RT_FONT, client, DixUseAccess);
|
||||
}
|
||||
if (rc == Success)
|
||||
|
|
@ -420,7 +420,7 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
|
|||
pPixmap = NullPixmap;
|
||||
}
|
||||
else {
|
||||
rc = dixLookupResource((pointer *)&pPixmap, pid,
|
||||
rc = dixLookupResourceByType((pointer *)&pPixmap, pid,
|
||||
RT_PIXMAP, client,
|
||||
DixReadAccess);
|
||||
if (rc != Success) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue