summaryrefslogtreecommitdiff
path: root/damageext
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-08-28 09:28:25 -0400
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2007-08-28 09:28:25 -0400
commit4017d3190234e189a0bbd33193a148d4d3c7556b (patch)
tree2ab228113d410386afde50c893f137d95974b8f3 /damageext
parent85547073265ae9bc4ae3af920a6d3214fd1ca0c5 (diff)
devPrivates rework: since API is already broken, switch everything
over to new system. Need to update documentation and address some remaining vestiges of old system such as CursorRec structure, fb "offman" structure, and FontRec privates.
Diffstat (limited to 'damageext')
-rwxr-xr-xdamageext/damageext.c6
-rw-r--r--damageext/damageextint.h2
2 files changed, 3 insertions, 5 deletions
diff --git a/damageext/damageext.c b/damageext/damageext.c
index e1724ecc7..159746536 100755
--- a/damageext/damageext.c
+++ b/damageext/damageext.c
@@ -29,7 +29,7 @@
static unsigned char DamageReqCode;
static int DamageEventBase;
static int DamageErrorBase;
-static int DamageClientPrivateIndex;
+static DevPrivateKey DamageClientPrivateKey = &DamageClientPrivateKey;
static RESTYPE DamageExtType;
static RESTYPE DamageExtWinType;
@@ -511,9 +511,7 @@ DamageExtensionInit(void)
if (!DamageExtWinType)
return;
- DamageClientPrivateIndex = AllocateClientPrivateIndex ();
- if (!AllocateClientPrivate (DamageClientPrivateIndex,
- sizeof (DamageClientRec)))
+ if (!dixRequestPrivate(DamageClientPrivateKey, sizeof (DamageClientRec)))
return;
if (!AddCallback (&ClientStateCallback, DamageClientCallback, 0))
return;
diff --git a/damageext/damageextint.h b/damageext/damageextint.h
index dfafc9319..e06f28c4e 100644
--- a/damageext/damageextint.h
+++ b/damageext/damageextint.h
@@ -48,7 +48,7 @@ typedef struct _DamageClient {
int critical;
} DamageClientRec, *DamageClientPtr;
-#define GetDamageClient(pClient) ((DamageClientPtr) (pClient)->devPrivates[DamageClientPrivateIndex].ptr)
+#define GetDamageClient(pClient) ((DamageClientPtr)dixLookupPrivate(&(pClient)->devPrivates, DamageClientPrivateKey))
typedef struct _DamageExt {
DamagePtr pDamage;