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:
Keith Packard 2010-06-05 21:08:01 -07:00
parent 6bd5f0d75b
commit e7fc8b32e4

View File

@ -136,6 +136,9 @@ shadowSetup(ScreenPtr pScreen)
{
shadowBufPtr pBuf;
if (!dixRegisterPrivateKey(&shadowScrPrivateKeyRec, PRIVATE_SCREEN, 0))
return FALSE;
if (!DamageSetup(pScreen))
return FALSE;
@ -233,9 +236,6 @@ shadowInit(ScreenPtr pScreen, ShadowUpdateProc update, ShadowWindowProc window)
{
PixmapPtr pPixmap;
if (!dixRegisterPrivateKey(&shadowScrPrivateKeyRec, PRIVATE_SCREEN, 0))
return FALSE;
pPixmap = pScreen->CreatePixmap(pScreen, pScreen->width, pScreen->height,
pScreen->rootDepth, 0);
if (!pPixmap)