mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-10 23:33:46 +00:00
Change the devPrivates API to require dixRegisterPrivateKey
This patch only changes the API, not the implementation of the devPrivates infrastructure. This will permit a new devPrivates implementation to be layed into the server without requiring simultaneous changes in every devPrivates user. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com>
This commit is contained in:
parent
c865a24401
commit
faeebead7b
139 changed files with 1105 additions and 711 deletions
|
|
@ -33,8 +33,8 @@
|
|||
#include "fboverlay.h"
|
||||
#include "shmint.h"
|
||||
|
||||
static int fbOverlayScreenPrivateKeyIndex;
|
||||
static DevPrivateKey fbOverlayScreenPrivateKey = &fbOverlayScreenPrivateKeyIndex;
|
||||
static DevPrivateKeyRec fbOverlayScreenPrivateKeyRec;
|
||||
#define fbOverlayScreenPrivateKey (&fbOverlayScreenPrivateKeyRec)
|
||||
|
||||
DevPrivateKey fbOverlayGetScreenPrivateKey(void)
|
||||
{
|
||||
|
|
@ -348,6 +348,9 @@ fbOverlayFinishScreenInit(ScreenPtr pScreen,
|
|||
VisualID defaultVisual;
|
||||
FbOverlayScrPrivPtr pScrPriv;
|
||||
|
||||
if (!dixRegisterPrivateKey(&fbOverlayScreenPrivateKeyRec, PRIVATE_SCREEN, 0))
|
||||
return FALSE;
|
||||
|
||||
pScrPriv = malloc(sizeof (FbOverlayScrPrivRec));
|
||||
if (!pScrPriv)
|
||||
return FALSE;
|
||||
|
|
@ -416,7 +419,6 @@ fbOverlayFinishScreenInit(ScreenPtr pScreen,
|
|||
pScrPriv->layer[1].u.init.pbits = pbits2;
|
||||
pScrPriv->layer[1].u.init.width = width2;
|
||||
pScrPriv->layer[1].u.init.depth = depth2;
|
||||
|
||||
dixSetPrivate(&pScreen->devPrivates, fbOverlayScreenPrivateKey, pScrPriv);
|
||||
|
||||
/* overwrite miCloseScreen with our own */
|
||||
|
|
|
|||
Loading…
Reference in a new issue