summaryrefslogtreecommitdiff
path: root/hw/xfree86/common/xf86RandR.c
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 /hw/xfree86/common/xf86RandR.c
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 'hw/xfree86/common/xf86RandR.c')
-rw-r--r--hw/xfree86/common/xf86RandR.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/xfree86/common/xf86RandR.c b/hw/xfree86/common/xf86RandR.c
index 77053b8c2..d7ffff4ca 100644
--- a/hw/xfree86/common/xf86RandR.c
+++ b/hw/xfree86/common/xf86RandR.c
@@ -46,7 +46,7 @@ typedef struct _xf86RandRInfo {
Rotation rotation;
} XF86RandRInfoRec, *XF86RandRInfoPtr;
-static int xf86RandRKeyIndex;
+static DevPrivateKeyRec xf86RandRKeyRec;
static DevPrivateKey xf86RandRKey;
#define XF86RANDRINFO(p) ((XF86RandRInfoPtr)dixLookupPrivate(&(p)->devPrivates, xf86RandRKey))
@@ -424,7 +424,10 @@ xf86RandRInit (ScreenPtr pScreen)
return TRUE;
#endif
- xf86RandRKey = &xf86RandRKeyIndex;
+ xf86RandRKey = &xf86RandRKeyRec;
+
+ if (!dixRegisterPrivateKey(&xf86RandRKeyRec, PRIVATE_SCREEN, 0))
+ return FALSE;
randrp = malloc(sizeof (XF86RandRInfoRec));
if (!randrp)