summaryrefslogtreecommitdiff
path: root/xfixes
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-04-26 17:22:21 -0700
committerKeith Packard <keithp@keithp.com>2010-06-05 19:23:03 -0700
commitfaeebead7bfcc78535757ca7acc1faf7554c03b7 (patch)
tree1a8f13a3b1ae968011efb9679bc3ed79a29020be /xfixes
parentc865a24401f06bcf1347d8b41f736a066ab25693 (diff)
Change the devPrivates API to require dixRegisterPrivateKey
This patch only changes the API, not the implementation of the devPrivates infrastructure. This will permit a new devPrivates implementation to be layed into the server without requiring simultaneous changes in every devPrivates user. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Diffstat (limited to 'xfixes')
-rw-r--r--xfixes/cursor.c7
-rw-r--r--xfixes/xfixes.c6
2 files changed, 8 insertions, 5 deletions
diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index 5f08db7a5..a9f089f28 100644
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -59,8 +59,8 @@ static RESTYPE CursorHideCountType;
static RESTYPE CursorWindowType;
static CursorPtr CursorCurrent[MAXDEVICES];
-static int CursorScreenPrivateKeyIndex;
-static DevPrivateKey CursorScreenPrivateKey = &CursorScreenPrivateKeyIndex;
+static DevPrivateKeyRec CursorScreenPrivateKeyRec;
+#define CursorScreenPrivateKey (&CursorScreenPrivateKeyRec)
static void deleteCursorHideCountsForScreen (ScreenPtr pScreen);
@@ -1037,6 +1037,9 @@ XFixesCursorInit (void)
if (party_like_its_1989)
CursorVisible = EnableCursor;
+ if (!dixRegisterPrivateKey(&CursorScreenPrivateKeyRec, PRIVATE_SCREEN, 0))
+ return FALSE;
+
for (i = 0; i < screenInfo.numScreens; i++)
{
ScreenPtr pScreen = screenInfo.screens[i];
diff --git a/xfixes/xfixes.c b/xfixes/xfixes.c
index 2f64a04f7..215909df1 100644
--- a/xfixes/xfixes.c
+++ b/xfixes/xfixes.c
@@ -56,8 +56,8 @@ static unsigned char XFixesReqCode;
int XFixesEventBase;
int XFixesErrorBase;
-static int XFixesClientPrivateKeyIndex;
-static DevPrivateKey XFixesClientPrivateKey = &XFixesClientPrivateKeyIndex;
+static DevPrivateKeyRec XFixesClientPrivateKeyRec;
+#define XFixesClientPrivateKey (&XFixesClientPrivateKeyRec)
static int
ProcXFixesQueryVersion(ClientPtr client)
@@ -241,7 +241,7 @@ XFixesExtensionInit(void)
{
ExtensionEntry *extEntry;
- if (!dixRequestPrivate(XFixesClientPrivateKey, sizeof (XFixesClientRec)))
+ if (!dixRegisterPrivateKey(&XFixesClientPrivateKeyRec, PRIVATE_CLIENT, sizeof (XFixesClientRec)))
return;
if (!AddCallback (&ClientStateCallback, XFixesClientCallback, 0))
return;