composite: Recompute clipping when changing between manual and automatic redirection

Call compMarkWindows() when changing between manual and automatic
redirection modes. Otherwise the window clipping won't be recomputed
correctly.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
This commit is contained in:
Ville Syrjälä 2011-04-13 21:46:20 +03:00
parent f2001b0f6d
commit eac37f32b8

View File

@ -226,6 +226,10 @@ compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update)
}
cw->update = CompositeRedirectManual;
}
else if (cw->update == CompositeRedirectAutomatic && !cw->damageRegistered) {
if (!anyMarked)
anyMarked = compMarkWindows (pWin, &pLayerWin);
}
if (!compCheckRedirect (pWin))
{
@ -314,6 +318,8 @@ compFreeClientWindow (WindowPtr pWin, XID id)
else if (cw->update == CompositeRedirectAutomatic &&
!cw->damageRegistered && pWin->redirectDraw != RedirectDrawNone)
{
anyMarked = compMarkWindows (pWin, &pLayerWin);
DamageRegister (&pWin->drawable, cw->damage);
cw->damageRegistered = TRUE;
pWin->redirectDraw = RedirectDrawAutomatic;