diff options
Diffstat (limited to 'randr/randr.c')
-rw-r--r-- | randr/randr.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/randr/randr.c b/randr/randr.c index 958f9c192..bc2b995d2 100644 --- a/randr/randr.c +++ b/randr/randr.c @@ -56,9 +56,9 @@ static int SProcRRDispatch (ClientPtr pClient); int RREventBase; int RRErrorBase; RESTYPE RRClientType, RREventType; /* resource types for event masks */ -int RRClientPrivateIndex; +DevPrivateKey RRClientPrivateKey = &RRClientPrivateKey; -int rrPrivIndex = -1; +DevPrivateKey rrPrivKey = &rrPrivKey; static void RRClientCallback (CallbackListPtr *list, @@ -214,8 +214,6 @@ Bool RRInit (void) return TRUE; } -static int RRScreenGeneration; - Bool RRScreenInit(ScreenPtr pScreen) { rrScrPrivPtr pScrPriv; @@ -223,13 +221,6 @@ Bool RRScreenInit(ScreenPtr pScreen) if (!RRInit ()) return FALSE; - if (RRScreenGeneration != serverGeneration) - { - if ((rrPrivIndex = AllocateScreenPrivateIndex()) < 0) - return FALSE; - RRScreenGeneration = serverGeneration; - } - pScrPriv = (rrScrPrivPtr) xcalloc (1, sizeof (rrScrPrivRec)); if (!pScrPriv) return FALSE; @@ -333,8 +324,7 @@ RRExtensionInit (void) if (RRNScreens == 0) return; - RRClientPrivateIndex = AllocateClientPrivateIndex (); - if (!AllocateClientPrivate (RRClientPrivateIndex, + if (!dixRequestPrivate(RRClientPrivateKey, sizeof (RRClientRec) + screenInfo.numScreens * sizeof (RRTimesRec))) return; |