xserver: Branch 'server-1.11-branch'

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Mon Oct 24 10:06:28 PDT 2011


 composite/compalloc.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit d780c6f6301ed2263b21ac7d327a1b2e8d3e76df
Author: Ville Syrjala <syrjala at sci.fi>
Date:   Sun Oct 9 01:11:04 2011 +0300

    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 at sci.fi>
    Reviewed-by: Keith Packard <keithp at keithp.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>
    (cherry picked from commit a5266dcb3a60587e1877f90c18552baf60b597a0)

diff --git a/composite/compalloc.c b/composite/compalloc.c
index f00bf4e..9857a92 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;
 }
 


More information about the xorg-commit mailing list