summaryrefslogtreecommitdiff
path: root/miext/rootless/accel/rlAccel.c
diff options
context:
space:
mode:
Diffstat (limited to 'miext/rootless/accel/rlAccel.c')
-rw-r--r--miext/rootless/accel/rlAccel.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/miext/rootless/accel/rlAccel.c b/miext/rootless/accel/rlAccel.c
index d62bee740..a14412416 100644
--- a/miext/rootless/accel/rlAccel.c
+++ b/miext/rootless/accel/rlAccel.c
@@ -46,10 +46,10 @@ typedef struct _rlAccelScreenRec {
CloseScreenProcPtr CloseScreen;
} rlAccelScreenRec, *rlAccelScreenPtr;
-static int rlAccelScreenPrivateIndex = -1;
+static DevPrivateKey rlAccelScreenPrivateKey = &rlAccelScreenPrivateKey;
-#define RLACCELREC(pScreen) \
- ((rlAccelScreenRec *)(pScreen)->devPrivates[rlAccelScreenPrivateIndex].ptr)
+#define RLACCELREC(pScreen) ((rlAccelScreenRec *) \
+ dixLookupPrivate(&(pScreen)->devPrivates, rlAccelScreenPrivateKey))
/* This is mostly identical to fbGCOps. */
static GCOps rlAccelOps = {
@@ -128,15 +128,8 @@ rlCloseScreen (int iScreen, ScreenPtr pScreen)
Bool
RootlessAccelInit(ScreenPtr pScreen)
{
- static unsigned long rlAccelGeneration = 0;
rlAccelScreenRec *s;
- if (rlAccelGeneration != serverGeneration) {
- rlAccelScreenPrivateIndex = AllocateScreenPrivateIndex();
- if (rlAccelScreenPrivateIndex == -1) return FALSE;
- rlAccelGeneration = serverGeneration;
- }
-
s = xalloc(sizeof(rlAccelScreenRec));
if (!s) return FALSE;
RLACCELREC(pScreen) = s;