Move the shadow screen private key initialization to shadowSetup
Some users of the shadow code don't call shadowInit, just shadowSetup and so make sure the key is initialized there. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
6bd5f0d75b
commit
e7fc8b32e4
|
@ -136,6 +136,9 @@ shadowSetup(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
shadowBufPtr pBuf;
|
shadowBufPtr pBuf;
|
||||||
|
|
||||||
|
if (!dixRegisterPrivateKey(&shadowScrPrivateKeyRec, PRIVATE_SCREEN, 0))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
if (!DamageSetup(pScreen))
|
if (!DamageSetup(pScreen))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -233,9 +236,6 @@ shadowInit(ScreenPtr pScreen, ShadowUpdateProc update, ShadowWindowProc window)
|
||||||
{
|
{
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
|
|
||||||
if (!dixRegisterPrivateKey(&shadowScrPrivateKeyRec, PRIVATE_SCREEN, 0))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
pPixmap = pScreen->CreatePixmap(pScreen, pScreen->width, pScreen->height,
|
pPixmap = pScreen->CreatePixmap(pScreen, pScreen->width, pScreen->height,
|
||||||
pScreen->rootDepth, 0);
|
pScreen->rootDepth, 0);
|
||||||
if (!pPixmap)
|
if (!pPixmap)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user