mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-16 19:32:26 +00:00
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.
This commit is contained in:
parent
8554707326
commit
4017d31902
261 changed files with 1642 additions and 3957 deletions
|
|
@ -164,13 +164,13 @@ typedef struct {
|
|||
ProcFunctionPtr recordVector[256];
|
||||
} RecordClientPrivateRec, *RecordClientPrivatePtr;
|
||||
|
||||
static int RecordClientPrivateIndex;
|
||||
static DevPrivateKey RecordClientPrivateKey = &RecordClientPrivateKey;
|
||||
|
||||
/* RecordClientPrivatePtr RecordClientPrivate(ClientPtr)
|
||||
* gets the client private of the given client. Syntactic sugar.
|
||||
*/
|
||||
#define RecordClientPrivate(_pClient) (RecordClientPrivatePtr) \
|
||||
((_pClient)->devPrivates[RecordClientPrivateIndex].ptr)
|
||||
dixLookupPrivate(&(_pClient)->devPrivates, RecordClientPrivateKey)
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
|
|
@ -982,8 +982,8 @@ RecordInstallHooks(RecordClientsAndProtocolPtr pRCAP, XID oneclient)
|
|||
memcpy(pClientPriv->recordVector, pClient->requestVector,
|
||||
sizeof (pClientPriv->recordVector));
|
||||
pClientPriv->originalVector = pClient->requestVector;
|
||||
pClient->devPrivates[RecordClientPrivateIndex].ptr =
|
||||
(pointer)pClientPriv;
|
||||
dixSetPrivate(&pClient->devPrivates,
|
||||
RecordClientPrivateKey, pClientPriv);
|
||||
pClient->requestVector = pClientPriv->recordVector;
|
||||
}
|
||||
while ((pIter = RecordIterateSet(pRCAP->pRequestMajorOpSet,
|
||||
|
|
@ -1096,7 +1096,8 @@ RecordUninstallHooks(RecordClientsAndProtocolPtr pRCAP, XID oneclient)
|
|||
if (!otherRCAPwantsProcVector)
|
||||
{ /* nobody needs it, so free it */
|
||||
pClient->requestVector = pClientPriv->originalVector;
|
||||
pClient->devPrivates[RecordClientPrivateIndex].ptr = NULL;
|
||||
dixSetPrivate(&pClient->devPrivates,
|
||||
RecordClientPrivateKey, NULL);
|
||||
xfree(pClientPriv);
|
||||
}
|
||||
} /* end if this RCAP specifies any requests */
|
||||
|
|
@ -2948,10 +2949,6 @@ RecordExtensionInit(void)
|
|||
if (!RTContext)
|
||||
return;
|
||||
|
||||
RecordClientPrivateIndex = AllocateClientPrivateIndex();
|
||||
if (!AllocateClientPrivate(RecordClientPrivateIndex, 0))
|
||||
return;
|
||||
|
||||
ppAllContexts = NULL;
|
||||
numContexts = numEnabledContexts = numEnabledRCAPs = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue