From e7fc8b32e41e10c057d2787fcc377296be67f2e9 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 5 Jun 2010 21:08:01 -0700 Subject: [PATCH] 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 Signed-off-by: Keith Packard --- miext/shadow/shadow.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/miext/shadow/shadow.c b/miext/shadow/shadow.c index 111f46a60..cb1b299fe 100644 --- a/miext/shadow/shadow.c +++ b/miext/shadow/shadow.c @@ -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)