diff options
author | Keith Packard <keithp@keithp.com> | 2008-08-06 15:26:24 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-03-09 13:08:09 -0700 |
commit | f8dd80d13bb5313a11b38b280f8ad3e22f0a6300 (patch) | |
tree | e0aea0e92304c050bb9eda0b7e4b71ad1d242e90 /dix/window.c | |
parent | 0d9a42dc0380d1583889b6b6521bd5a2451735d4 (diff) |
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.
Diffstat (limited to 'dix/window.c')
-rw-r--r-- | dix/window.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dix/window.c b/dix/window.c index 2a5da53ea..e2669f0c5 100644 --- a/dix/window.c +++ b/dix/window.c @@ -1062,7 +1062,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) } else { - rc = dixLookupResource((pointer *)&pPixmap, pixID, RT_PIXMAP, + rc = dixLookupResourceByType((pointer *)&pPixmap, pixID, RT_PIXMAP, client, DixReadAccess); if (rc == Success) { @@ -1122,7 +1122,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) pixID = pWin->parent->border.pixmap->drawable.id; } } - rc = dixLookupResource((pointer *)&pPixmap, pixID, RT_PIXMAP, + rc = dixLookupResourceByType((pointer *)&pPixmap, pixID, RT_PIXMAP, client, DixReadAccess); if (rc == Success) { @@ -1284,7 +1284,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) error = BadMatch; goto PatchUp; } - rc = dixLookupResource((pointer *)&pCmap, cmap, RT_COLORMAP, + rc = dixLookupResourceByType((pointer *)&pCmap, cmap, RT_COLORMAP, client, DixUseAccess); if (rc != Success) { @@ -1360,7 +1360,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) } else { - rc = dixLookupResource((pointer *)&pCursor, cursorID, + rc = dixLookupResourceByType((pointer *)&pCursor, cursorID, RT_CURSOR, client, DixUseAccess); if (rc != Success) { |