mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-22 20:35:43 +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
|
|
@ -33,12 +33,11 @@
|
|||
#include "fboverlay.h"
|
||||
#include "shmint.h"
|
||||
|
||||
int fbOverlayGeneration;
|
||||
int fbOverlayScreenPrivateIndex = -1;
|
||||
static DevPrivateKey fbOverlayScreenPrivateKey = &fbOverlayScreenPrivateKey;
|
||||
|
||||
int fbOverlayGetScreenPrivateIndex(void)
|
||||
DevPrivateKey fbOverlayGetScreenPrivateKey(void)
|
||||
{
|
||||
return fbOverlayScreenPrivateIndex;
|
||||
return fbOverlayScreenPrivateKey;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -65,7 +64,7 @@ fbOverlayCreateWindow(WindowPtr pWin)
|
|||
pPixmap = pScrPriv->layer[i].u.run.pixmap;
|
||||
if (pWin->drawable.depth == pPixmap->drawable.depth)
|
||||
{
|
||||
pWin->devPrivates[fbWinPrivateIndex].ptr = (pointer) pPixmap;
|
||||
dixSetPrivate(&pWin->devPrivates, fbGetWinPrivateKey(), pPixmap);
|
||||
/*
|
||||
* Make sure layer keys are written correctly by
|
||||
* having non-root layers set to full while the
|
||||
|
|
@ -108,7 +107,7 @@ fbOverlayWindowLayer(WindowPtr pWin)
|
|||
int i;
|
||||
|
||||
for (i = 0; i < pScrPriv->nlayers; i++)
|
||||
if (pWin->devPrivates[fbWinPrivateIndex].ptr ==
|
||||
if (dixLookupPrivate(&pWin->devPrivates, fbGetWinPrivateKey()) ==
|
||||
(pointer) pScrPriv->layer[i].u.run.pixmap)
|
||||
return i;
|
||||
return 0;
|
||||
|
|
@ -358,12 +357,6 @@ fbOverlayFinishScreenInit(ScreenPtr pScreen,
|
|||
VisualID defaultVisual;
|
||||
FbOverlayScrPrivPtr pScrPriv;
|
||||
|
||||
if (fbOverlayGeneration != serverGeneration)
|
||||
{
|
||||
fbOverlayScreenPrivateIndex = AllocateScreenPrivateIndex ();
|
||||
fbOverlayGeneration = serverGeneration;
|
||||
}
|
||||
|
||||
pScrPriv = xalloc (sizeof (FbOverlayScrPrivRec));
|
||||
if (!pScrPriv)
|
||||
return FALSE;
|
||||
|
|
@ -433,7 +426,7 @@ fbOverlayFinishScreenInit(ScreenPtr pScreen,
|
|||
pScrPriv->layer[1].u.init.width = width2;
|
||||
pScrPriv->layer[1].u.init.depth = depth2;
|
||||
|
||||
pScreen->devPrivates[fbOverlayScreenPrivateIndex].ptr = (pointer) pScrPriv;
|
||||
dixSetPrivate(&pScreen->devPrivates, fbOverlayScreenPrivateKey, pScrPriv);
|
||||
|
||||
/* overwrite miCloseScreen with our own */
|
||||
pScreen->CloseScreen = fbOverlayCloseScreen;
|
||||
|
|
|
|||
Loading…
Reference in a new issue