summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPauli Nieminen <pauli.nieminen@linux.intel.com>2011-09-22 18:38:53 +0300
committerKeith Packard <keithp@keithp.com>2011-10-03 11:41:22 -0700
commit463dd87062edaa974cb8c7163328a53197f237e1 (patch)
treedec2f929723aa6a7035663781c752315e447c12c
parentf5d50b46ddeb039ab6564141f61261e94ee67637 (diff)
xf86/modes: Fix shadow rotation crashing when screen pixmap changes
Driver may change screen pixmaps after page flipping that would then make damage lose track of the root pixmap. Using root window for shadow damages fixes the problem because SetWindowPixmap is implemented in shadow code. Signed-off-by: Pauli Nieminen <pauli.nieminen@linux.intel.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--hw/xfree86/modes/xf86Rotate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index 45aabf025..ff7000b5a 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -198,7 +198,7 @@ xf86RotatePrepare (ScreenPtr pScreen)
if (!xf86_config->rotation_damage_registered)
{
/* Hook damage to screen pixmap */
- DamageRegister (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
+ DamageRegister (&pScreen->root->drawable,
xf86_config->rotation_damage);
xf86_config->rotation_damage_registered = TRUE;
EnableLimitedSchedulingLatency();
@@ -305,7 +305,7 @@ xf86RotateDestroy (xf86CrtcPtr crtc)
/* Free damage structure */
if (xf86_config->rotation_damage_registered)
{
- DamageUnregister (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
+ DamageUnregister (&pScreen->root->drawable,
xf86_config->rotation_damage);
xf86_config->rotation_damage_registered = FALSE;
DisableLimitedSchedulingLatency();