Switching from Automatic to Manual redirect needs to unmap/remap

When changing a window from automatic redirection to manual redirection, the
parent clip list needs to be recomputed; the easy way to get that computed
right is to unmap/map the window, just as when redirecting the window the
first time.

Thanks to Owen Taylor for helping diagnose this.

Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Keith Packard 2008-09-18 12:14:58 -07:00
parent 8bfd88ca61
commit d26083fe02
1 changed files with 10 additions and 0 deletions

View File

@ -148,6 +148,16 @@ compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update)
return BadAlloc;
if (ccw->update == CompositeRedirectManual)
{
/* If the window was CompositeRedirectAutomatic, then
* unmap the window so that the parent clip list will
* be correctly recomputed.
*/
if (pWin->mapped)
{
DisableMapUnmapEvents (pWin);
UnmapWindow (pWin, FALSE);
EnableMapUnmapEvents (pWin);
}
if (cw->damageRegistered)
{
DamageUnregister (&pWin->drawable, cw->damage);