summaryrefslogtreecommitdiff
path: root/xfixes
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2010-04-24 23:56:36 -0700
committerJamey Sharp <jamey@minilop.net>2010-05-19 12:32:48 -0700
commitc38552d115e3bc71ad6179a8ad0d68778e943793 (patch)
treeaf6a02d6e34896c2a91b49ba568dab6bbad8b7d8 /xfixes
parente291c561821ae86b7dd74269d5cd29bc31703962 (diff)
Add typed resource-lookup errors for non-core resource types.
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'xfixes')
-rw-r--r--xfixes/xfixes.c1
-rw-r--r--xfixes/xfixes.h5
2 files changed, 2 insertions, 4 deletions
diff --git a/xfixes/xfixes.c b/xfixes/xfixes.c
index 49ed5a0d5..2f64a04f7 100644
--- a/xfixes/xfixes.c
+++ b/xfixes/xfixes.c
@@ -259,5 +259,6 @@ XFixesExtensionInit(void)
(EventSwapPtr) SXFixesSelectionNotifyEvent;
EventSwapVector[XFixesEventBase + XFixesCursorNotify] =
(EventSwapPtr) SXFixesCursorNotifyEvent;
+ SetResourceTypeErrorValue(RegionResType, XFixesErrorBase + BadRegion);
}
}
diff --git a/xfixes/xfixes.h b/xfixes/xfixes.h
index 69d162ffe..1638350c2 100644
--- a/xfixes/xfixes.h
+++ b/xfixes/xfixes.h
@@ -37,10 +37,7 @@ extern _X_EXPORT int XFixesErrorBase;
int err; \
err = dixLookupResourceByType((pointer *) &pRegion, rid, \
RegionResType, client, mode); \
- if (err == BadValue) { \
- client->errorValue = rid; \
- return XFixesErrorBase + BadRegion; \
- } else if (err != Success) { \
+ if (err != Success) { \
client->errorValue = rid; \
return err; \
} \