composite: Propagate damagedDescendants when reparented

If a window that is fully covered by an automatic-redirected descendant
(even implicitly, eg. via BackingStores) is reparented, the automatic
updates could be broken if the new parent is not marked as having
damaged descendants.

Fix this issue by propagating the damagedDescendants flag whenever a
window is reparented.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
This commit is contained in:
Peter Harris
2017-12-14 12:21:19 -05:00
committed by Adam Jackson
parent ac138f9b31
commit d5c23b2948
3 changed files with 20 additions and 8 deletions

View File

@@ -432,6 +432,7 @@ compReparentWindow(WindowPtr pWin, WindowPtr pPriorParent)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
CompScreenPtr cs = GetCompScreen(pScreen);
CompWindowPtr cw = GetCompWindow(pWin);
pScreen->ReparentWindow = cs->ReparentWindow;
/*
@@ -469,6 +470,10 @@ compReparentWindow(WindowPtr pWin, WindowPtr pPriorParent)
(*pScreen->ReparentWindow) (pWin, pPriorParent);
cs->ReparentWindow = pScreen->ReparentWindow;
pScreen->ReparentWindow = compReparentWindow;
if (pWin->damagedDescendants || (cw && cw->damaged))
compMarkAncestors(pWin);
compCheckTree(pWin->drawable.pScreen);
}