diff options
author | marha <marha@users.sourceforge.net> | 2009-09-09 05:23:48 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-09-09 05:23:48 +0000 |
commit | 81f91c615982e50bb62708201569c33a3cd3d973 (patch) | |
tree | 4f32ecc48a3b7b5e76642f3792338263c53879bd /xorg-server/xfixes/xfixes.h | |
parent | b571a562410f565af2bdde52d9f7f9a23ffae04f (diff) | |
parent | a915739887477b28d924ecc8417ee107d125bd6c (diff) | |
download | vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.gz vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.bz2 vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.zip |
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
Diffstat (limited to 'xorg-server/xfixes/xfixes.h')
-rw-r--r-- | xorg-server/xfixes/xfixes.h | 28 |
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); |