diff options
Diffstat (limited to 'randr/randrstr.h')
-rw-r--r-- | randr/randrstr.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/randr/randrstr.h b/randr/randrstr.h index bd19fe9d0..e8358bc0c 100644 --- a/randr/randrstr.h +++ b/randr/randrstr.h @@ -262,11 +262,11 @@ typedef struct _rrScrPriv { #endif } rrScrPrivRec, *rrScrPrivPtr; -extern int rrPrivIndex; +extern DevPrivateKey rrPrivKey; -#define rrGetScrPriv(pScr) ((rrScrPrivPtr) (pScr)->devPrivates[rrPrivIndex].ptr) +#define rrGetScrPriv(pScr) ((rrScrPrivPtr)dixLookupPrivate(&(pScr)->devPrivates, rrPrivKey)) #define rrScrPriv(pScr) rrScrPrivPtr pScrPriv = rrGetScrPriv(pScr) -#define SetRRScreen(s,p) ((s)->devPrivates[rrPrivIndex].ptr = (pointer) (p)) +#define SetRRScreen(s,p) dixSetPrivate(&(s)->devPrivates, rrPrivKey, p) /* * each window has a list of clients requesting @@ -298,7 +298,7 @@ typedef struct _RRClient { } RRClientRec, *RRClientPtr; extern RESTYPE RRClientType, RREventType; /* resource types for event masks */ -extern int RRClientPrivateIndex; +extern DevPrivateKey RRClientPrivateKey; extern RESTYPE RRCrtcType, RRModeType, RROutputType; #define LookupOutput(client,id,a) ((RROutputPtr) \ @@ -311,7 +311,7 @@ extern RESTYPE RRCrtcType, RRModeType, RROutputType; (SecurityLookupIDByType (client, id, \ RRModeType, a))) -#define GetRRClient(pClient) ((RRClientPtr) (pClient)->devPrivates[RRClientPrivateIndex].ptr) +#define GetRRClient(pClient) ((RRClientPtr)dixLookupPrivate(&(pClient)->devPrivates, RRClientPrivateKey)) #define rrClientPriv(pClient) RRClientPtr pRRClient = GetRRClient(pClient) /* Initialize the extension */ |