summaryrefslogtreecommitdiff
path: root/randr/randr.c
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-08-28 09:28:25 -0400
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2007-08-28 09:28:25 -0400
commit4017d3190234e189a0bbd33193a148d4d3c7556b (patch)
tree2ab228113d410386afde50c893f137d95974b8f3 /randr/randr.c
parent85547073265ae9bc4ae3af920a6d3214fd1ca0c5 (diff)
devPrivates rework: since API is already broken, switch everything
over to new system. Need to update documentation and address some remaining vestiges of old system such as CursorRec structure, fb "offman" structure, and FontRec privates.
Diffstat (limited to 'randr/randr.c')
-rw-r--r--randr/randr.c16
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;