diff options
author | Ville Syrjala <syrjala@sci.fi> | 2011-10-09 01:11:04 +0300 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-10-19 17:24:23 -0700 |
commit | a5266dcb3a60587e1877f90c18552baf60b597a0 (patch) | |
tree | 8ca256d80002ffadd06f7213b5735352c63cb5ba /composite | |
parent | e4787ec20b1b9d30fe00f17b60eb0898190bf77d (diff) |
composite: Update borderClip in compAllocPixmap()
Previously the parent constrained borderClip was copied over
when compRedirectWindow() is called. That is insufficient eg. in
case the window was already redirected, but not yet realized. So
copy the borderClip over in compAllocPixmap() instead.
Example:
Window 1 is below an automatically redirect window 2. Window 2 is
unmapped and moved outside the extents of window 1. Window 2 is
then mapped again, and MarkOverlappedWindows() uses the up to
date borderSize of window 2 to mark windows, which leaves
window 1 unmarked. Then exposures are calculated using the stale
borderClip of window 2, which causes the window below window 2,
to be exposed through an apparent hole in window 1.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=22566
Signed-off-by: Ville Syrjala <syrjala@sci.fi>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'composite')
-rw-r--r-- | composite/compalloc.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/composite/compalloc.c b/composite/compalloc.c index f00bf4eb0..9857a92b2 100644 --- a/composite/compalloc.c +++ b/composite/compalloc.c @@ -196,11 +196,7 @@ compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update) anyMarked = compMarkWindows (pWin, &pLayerWin); - /* Make sure our borderClip is correct for ValidateTree */ RegionNull(&cw->borderClip); - RegionCopy(&cw->borderClip, &pWin->borderClip); - cw->borderClipX = pWin->drawable.x; - cw->borderClipY = pWin->drawable.y; cw->update = CompositeRedirectAutomatic; cw->clients = 0; cw->oldx = COMP_ORIGIN_INVALID; @@ -658,6 +654,13 @@ compAllocPixmap (WindowPtr pWin) DamageRegister (&pWin->drawable, cw->damage); cw->damageRegistered = TRUE; } + + /* Make sure our borderClip is up to date */ + RegionUninit(&cw->borderClip); + RegionCopy(&cw->borderClip, &pWin->borderClip); + cw->borderClipX = pWin->drawable.x; + cw->borderClipY = pWin->drawable.y; + return TRUE; } |