summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-06-05 21:08:01 -0700
committerKeith Packard <keithp@keithp.com>2010-06-05 21:12:41 -0700
commite7fc8b32e41e10c057d2787fcc377296be67f2e9 (patch)
tree198e461fd4702bc03d267256574d6088ad19e311
parent6bd5f0d75bca727c4686b20eee166c8cae472ba2 (diff)
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>
-rw-r--r--miext/shadow/shadow.c6
1 files 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)