summaryrefslogtreecommitdiff
path: root/dix
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 /dix
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 'dix')
-rw-r--r--dix/devices.c6
-rw-r--r--dix/events.c3
-rw-r--r--dix/window.c3
3 files changed, 8 insertions, 4 deletions
diff --git a/dix/devices.c b/dix/devices.c
index 2225e08a7..7e1ce3513 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -91,9 +91,11 @@ SOFTWARE.
* This file handles input device-related stuff.
*/
-DevPrivateKey CoreDevicePrivateKey = &CoreDevicePrivateKey;
+static int CoreDevicePrivateKeyIndex;
+DevPrivateKey CoreDevicePrivateKey = &CoreDevicePrivateKeyIndex;
/* Used to sture classes currently not in use by an MD */
-DevPrivateKey UnusedClassesPrivateKey = &UnusedClassesPrivateKey;
+static int UnusedClassesPrivateKeyIndex;
+DevPrivateKey UnusedClassesPrivateKey = &UnusedClassesPrivateKeyIndex;
/**
diff --git a/dix/events.c b/dix/events.c
index 7a79d292b..2947ff1aa 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -1504,7 +1504,8 @@ CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode)
}
/* Only ever used if a grab is called on an attached slave device. */
-static DevPrivateKey GrabPrivateKey = &GrabPrivateKey;
+static int GrabPrivateKeyIndex;
+static DevPrivateKey GrabPrivateKey = &GrabPrivateKeyIndex;
typedef struct _GrabMemoryRec {
DeviceIntPtr oldmaster;
} GrabMemoryRec, *GrabMemoryPtr;
diff --git a/dix/window.c b/dix/window.c
index 9bcf546aa..b588f4466 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -154,7 +154,8 @@ _X_EXPORT int screenIsSaved = SCREEN_SAVER_OFF;
_X_EXPORT ScreenSaverStuffRec savedScreenInfo[MAXSCREENS];
-_X_EXPORT DevPrivateKey FocusPrivatesKey = &FocusPrivatesKey;
+static int FocusPrivatesKeyIndex;
+_X_EXPORT DevPrivateKey FocusPrivatesKey = &FocusPrivatesKeyIndex;
static Bool TileScreenSaver(int i, int kind);