diff options
author | Keith Packard <keithp@keithp.com> | 2008-09-18 12:14:58 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2008-09-19 20:58:32 -0700 |
commit | d26083fe02658e7312a8da6a5b11652f9fe57bc8 (patch) | |
tree | 6a8532d7b0c44dda1a20b31d08cbcf6e07ba56e5 /composite | |
parent | 8bfd88ca61a1747714781a090d1c9dd8f3ad5dfc (diff) |
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>
Diffstat (limited to 'composite')
-rw-r--r-- | composite/compalloc.c | 10 |
1 files changed, 10 insertions, 0 deletions
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); |