aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xfixes/xfixes.h
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/xfixes/xfixes.h')
-rw-r--r--xorg-server/xfixes/xfixes.h28
1 files changed, 17 insertions, 11 deletions
diff --git a/xorg-server/xfixes/xfixes.h b/xorg-server/xfixes/xfixes.h
index 81dd83daf..69d162ffe 100644
--- a/xorg-server/xfixes/xfixes.h
+++ b/xorg-server/xfixes/xfixes.h
@@ -29,23 +29,29 @@
#include "resource.h"
-extern RESTYPE RegionResType;
-extern int XFixesErrorBase;
-
-#define VERIFY_REGION(pRegion, rid, client, mode) { \
- pRegion = SecurityLookupIDByType (client, rid, RegionResType, mode); \
- if (!pRegion) { \
- client->errorValue = rid; \
- return XFixesErrorBase + BadRegion; \
- } \
-}
+extern _X_EXPORT RESTYPE RegionResType;
+extern _X_EXPORT int XFixesErrorBase;
+
+#define VERIFY_REGION(pRegion, rid, client, mode) \
+ do { \
+ int err; \
+ err = dixLookupResourceByType((pointer *) &pRegion, rid, \
+ RegionResType, client, mode); \
+ if (err == BadValue) { \
+ client->errorValue = rid; \
+ return XFixesErrorBase + BadRegion; \
+ } else if (err != Success) { \
+ client->errorValue = rid; \
+ return err; \
+ } \
+ } while (0)
#define VERIFY_REGION_OR_NONE(pRegion, rid, client, mode) { \
pRegion = 0; \
if (rid) VERIFY_REGION(pRegion, rid, client, mode); \
}
-RegionPtr
+extern _X_EXPORT RegionPtr
XFixesRegionCopy (RegionPtr pRegion);