summaryrefslogtreecommitdiff
path: root/hw/kdrive/src/kdrive.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/kdrive/src/kdrive.c')
-rw-r--r--hw/kdrive/src/kdrive.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index 27596e467..06c3661da 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -64,8 +64,7 @@ KdDepths kdDepths[] = {
#define KD_DEFAULT_BUTTONS 5
-static int kdScreenPrivateKeyIndex;
-DevPrivateKey kdScreenPrivateKey = &kdScreenPrivateKeyIndex;
+DevPrivateKeyRec kdScreenPrivateKeyRec;
unsigned long kdGeneration;
Bool kdVideoTest;
@@ -699,6 +698,9 @@ KdAllocatePrivates (ScreenPtr pScreen)
if (kdGeneration != serverGeneration)
kdGeneration = serverGeneration;
+ if (!dixRegisterPrivateKey(&kdScreenPrivateKeyRec, PRIVATE_SCREEN, 0))
+ return FALSE;
+
pScreenPriv = calloc(1, sizeof (*pScreenPriv));
if (!pScreenPriv)
return FALSE;