Commit 463dd870 authored by Pauli Nieminen's avatar Pauli Nieminen Committed by Keith Packard

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: default avatarPauli Nieminen <pauli.nieminen@linux.intel.com>
Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
parent f5d50b46
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment