diff options
author | marha <marha@users.sourceforge.net> | 2011-01-08 19:40:59 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-01-08 19:40:59 +0000 |
commit | 432768f75da13ee5343957df6ce5cd316a62929f (patch) | |
tree | b02a3961540984c3d2caf783a6f0854b9b00f92a /xorg-server/composite/compwindow.c | |
parent | 43b6c9073b8aad1170536ae5c6a5a019617659f1 (diff) | |
download | vcxsrv-432768f75da13ee5343957df6ce5cd316a62929f.tar.gz vcxsrv-432768f75da13ee5343957df6ce5cd316a62929f.tar.bz2 vcxsrv-432768f75da13ee5343957df6ce5cd316a62929f.zip |
xserver mesa libX11 xkbcomp pixman git update 8/1/2011
Diffstat (limited to 'xorg-server/composite/compwindow.c')
-rw-r--r-- | xorg-server/composite/compwindow.c | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/xorg-server/composite/compwindow.c b/xorg-server/composite/compwindow.c index 11df8b39d..ef1f7f154 100644 --- a/xorg-server/composite/compwindow.c +++ b/xorg-server/composite/compwindow.c @@ -653,9 +653,10 @@ compWindowFormat (WindowPtr pWin) }
static void
-compWindowUpdateAutomatic (WindowPtr pWin, ScreenPtr pScreen)
+compWindowUpdateAutomatic (WindowPtr pWin)
{
CompWindowPtr cw = GetCompWindow (pWin);
+ ScreenPtr pScreen = pWin->drawable.pScreen;
WindowPtr pParent = pWin->parent;
PixmapPtr pSrcPixmap = (*pScreen->GetWindowPixmap) (pWin);
PictFormatPtr pSrcFormat = compWindowFormat (pWin);
@@ -678,7 +679,8 @@ compWindowUpdateAutomatic (WindowPtr pWin, ScreenPtr pScreen) /*
* First move the region from window to screen coordinates
*/
- RegionTranslate(pRegion, pWin->drawable.x, pWin->drawable.y);
+ RegionTranslate(pRegion,
+ pWin->drawable.x, pWin->drawable.y);
/*
* Clip against the "real" border clip
@@ -688,7 +690,8 @@ compWindowUpdateAutomatic (WindowPtr pWin, ScreenPtr pScreen) /*
* Now translate from screen to dest coordinates
*/
- RegionTranslate(pRegion, -pParent->drawable.x, -pParent->drawable.y);
+ RegionTranslate(pRegion,
+ -pParent->drawable.x, -pParent->drawable.y);
/*
* Clip the picture
@@ -717,26 +720,35 @@ compWindowUpdateAutomatic (WindowPtr pWin, ScreenPtr pScreen) DamageEmpty (cw->damage);
}
-static int
-compWindowUpdateVisit(WindowPtr pWin, void *data)
+static void
+compPaintWindowToParent (WindowPtr pWin)
{
+ compPaintChildrenToWindow (pWin);
+
if (pWin->redirectDraw != RedirectDrawNone)
{
- CompWindowPtr cw = GetCompWindow(pWin);
+ CompWindowPtr cw = GetCompWindow(pWin);
+
if (cw->damaged)
{
- compWindowUpdateAutomatic(pWin, data);
+ compWindowUpdateAutomatic (pWin);
cw->damaged = FALSE;
}
}
-
- return WT_WALKCHILDREN;
}
void
-compWindowUpdate (WindowPtr pWin)
+compPaintChildrenToWindow (WindowPtr pWin)
{
- TraverseTree(pWin, compWindowUpdateVisit, pWin->drawable.pScreen);
+ WindowPtr pChild;
+
+ if (!pWin->damagedDescendants)
+ return;
+
+ for (pChild = pWin->lastChild; pChild; pChild = pChild->prevSib)
+ compPaintWindowToParent (pChild);
+
+ pWin->damagedDescendants = FALSE;
}
WindowPtr
|