composite: Fix pWin->redirectDraw when changing between manual and automatic redirection

compAllowPixmap() is not called when changing between manual and
automatic redirection modes. That means pWin->redirectDraw is left
with an incorrect value, and miComputeClips() gets confused whether
the window is supposed to be treated as transparent or not. Fix
the issue by updating pWin->redirectDraw in compCheckRedirect()
even when not calling compAllocPixmap().

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
This commit is contained in:
Ville Syrjälä 2011-04-13 21:45:43 +03:00
parent 74663e6152
commit f2001b0f6d
1 changed files with 5 additions and 0 deletions

View File

@ -171,6 +171,11 @@ compCheckRedirect (WindowPtr pWin)
compRestoreWindow (pWin, pPixmap);
(*pScreen->DestroyPixmap) (pPixmap);
}
} else if (should) {
if (cw->update == CompositeRedirectAutomatic)
pWin->redirectDraw = RedirectDrawAutomatic;
else
pWin->redirectDraw = RedirectDrawManual;
}
return TRUE;
}