summaryrefslogtreecommitdiff
path: root/hw/kdrive
diff options
context:
space:
mode:
authorTomas Carnecky <tom@dbservice.com>2008-08-28 18:05:40 -0400
committerEamon Walsh <ewalsh@tycho.nsa.gov>2008-08-28 18:05:40 -0400
commitebea78cdba0ff14a397239ee1936bd254c181e1b (patch)
tree3937720753cc112aaf9eb71ba0dcb39674362b98 /hw/kdrive
parentec7907f8fa04dcff2649cc4846975844314f737e (diff)
Prepare for array-index based devPrivates.
TODO: static indices can be made just an int; some indices can be combined.
Diffstat (limited to 'hw/kdrive')
-rw-r--r--hw/kdrive/ephyr/ephyrdriext.c6
-rw-r--r--hw/kdrive/src/kdrive.c3
-rw-r--r--hw/kdrive/src/kxv.c7
3 files changed, 10 insertions, 6 deletions
diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c
index 05cecf478..a906ad170 100644
--- a/hw/kdrive/ephyr/ephyrdriext.c
+++ b/hw/kdrive/ephyr/ephyrdriext.c
@@ -111,8 +111,10 @@ static Bool findWindowPairFromLocal (WindowPtr a_local,
static unsigned char DRIReqCode = 0;
-static DevPrivateKey ephyrDRIWindowKey = &ephyrDRIWindowKey;
-static DevPrivateKey ephyrDRIScreenKey = &ephyrDRIScreenKey;
+static int ephyrDRIWindowKeyIndex;
+static DevPrivateKey ephyrDRIWindowKey = &ephyrDRIWindowKeyIndex;
+static int ephyrDRIScreenKeyIndex;
+static DevPrivateKey ephyrDRIScreenKey = &ephyrDRIScreenKeyIndex;
#define GET_EPHYR_DRI_WINDOW_PRIV(win) ((EphyrDRIWindowPrivPtr) \
dixLookupPrivate(&(win)->devPrivates, ephyrDRIWindowKey))
diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index 9e27840b7..1478a944d 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -67,7 +67,8 @@ KdDepths kdDepths[] = {
#define KD_DEFAULT_BUTTONS 5
-DevPrivateKey kdScreenPrivateKey = &kdScreenPrivateKey;
+static int kdScreenPrivateKeyIndex;
+DevPrivateKey kdScreenPrivateKey = &kdScreenPrivateKeyIndex;
unsigned long kdGeneration;
Bool kdVideoTest;
diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c
index 83ca3935f..9a74654af 100644
--- a/hw/kdrive/src/kxv.c
+++ b/hw/kdrive/src/kxv.c
@@ -103,9 +103,10 @@ static void KdXVClipNotify(WindowPtr pWin, int dx, int dy);
/* misc */
static Bool KdXVInitAdaptors(ScreenPtr, KdVideoAdaptorPtr*, int);
-
-DevPrivateKey KdXVWindowKey = &KdXVWindowKey;
-DevPrivateKey KdXvScreenKey = &KdXvScreenKey;
+static int KdXVWindowKeyIndex;
+DevPrivateKey KdXVWindowKey = &KdXVWindowKeyIndex;
+static int KdXvScreenKeyIndex;
+DevPrivateKey KdXvScreenKey = &KdXvScreenKeyIndex;
static unsigned long KdXVGeneration = 0;
static unsigned long PortResource = 0;