diff options
author | Jamey Sharp <jamey@minilop.net> | 2010-04-24 23:26:40 -0700 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2010-05-19 12:32:48 -0700 |
commit | e291c561821ae86b7dd74269d5cd29bc31703962 (patch) | |
tree | 5b4c5b1448c6b08bd4cb6712eb6314e29f8e591f /dix/cursor.c | |
parent | 90e612dcbe370da095d317fac62c80ac2447fa0b (diff) |
Return an appropriately-typed error from dixLookupResourceByType.
Rather than always returning BadValue, associate an error status like
BadWindow with a resource type like RT_WINDOW, and return the
appropriate one for the requested type.
This patch only touches the core protocol resource types. Others still
return BadValue and need to be mapped appropriately.
dixLookupResourceByType can now return BadImplementation, if the caller
asked for a resource type that has not been allocated in the server.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'dix/cursor.c')
-rw-r--r-- | dix/cursor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dix/cursor.c b/dix/cursor.c index a512309bb..7ff0a932e 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -316,14 +316,14 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, if (rc != Success) { client->errorValue = source; - return (rc == BadValue) ? BadFont : rc; + return rc; } rc = dixLookupResourceByType((pointer *)&maskfont, mask, RT_FONT, client, DixUseAccess); if (rc != Success && mask != None) { client->errorValue = mask; - return (rc == BadValue) ? BadFont : rc; + return rc; } if (sourcefont != maskfont) pShare = (GlyphSharePtr)NULL; |