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/events.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/events.c')
-rw-r--r-- | dix/events.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dix/events.c b/dix/events.c index 39ad4007c..9e05dc96c 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4697,7 +4697,7 @@ ProcChangeActivePointerGrab(ClientPtr client) if (rc != Success) { client->errorValue = stuff->cursor; - return (rc == BadValue) ? BadCursor : rc; + return rc; } } @@ -4820,7 +4820,7 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, if (rc != Success) { client->errorValue = curs; - return (rc == BadValue) ? BadCursor : rc; + return rc; } access_mode |= DixForceAccess; } @@ -5345,7 +5345,7 @@ ProcGrabButton(ClientPtr client) if (rc != Success) { client->errorValue = stuff->cursor; - return (rc == BadValue) ? BadCursor : rc; + return rc; } access_mode |= DixForceAccess; } @@ -5608,7 +5608,7 @@ ProcRecolorCursor(ClientPtr client) if (rc != Success) { client->errorValue = stuff->cursor; - return (rc == BadValue) ? BadCursor : rc; + return rc; } pCursor->foreRed = stuff->foreRed; |