From d26083fe02658e7312a8da6a5b11652f9fe57bc8 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 18 Sep 2008 12:14:58 -0700 Subject: 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 --- composite/compalloc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'composite') diff --git a/composite/compalloc.c b/composite/compalloc.c index e16eecf21..a2f3f140a 100644 --- a/composite/compalloc.c +++ b/composite/compalloc.c @@ -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); -- cgit v1.2.3