aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/composite/compalloc.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-01-08 21:42:21 +0000
committermarha <marha@users.sourceforge.net>2011-01-08 21:42:21 +0000
commitee97a3165b1f07f011cf95804590925b81e8ec96 (patch)
tree58aa78664ad871145a5a0149f9ad60f140f934aa /xorg-server/composite/compalloc.c
parentc8a34ce9318446bcd8e91e601525a61d6847f28f (diff)
parent432768f75da13ee5343957df6ce5cd316a62929f (diff)
downloadvcxsrv-ee97a3165b1f07f011cf95804590925b81e8ec96.tar.gz
vcxsrv-ee97a3165b1f07f011cf95804590925b81e8ec96.tar.bz2
vcxsrv-ee97a3165b1f07f011cf95804590925b81e8ec96.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/composite/compalloc.c')
-rw-r--r--xorg-server/composite/compalloc.c38
1 files changed, 37 insertions, 1 deletions
diff --git a/xorg-server/composite/compalloc.c b/xorg-server/composite/compalloc.c
index c69a9c05c..8853f7058 100644
--- a/xorg-server/composite/compalloc.c
+++ b/xorg-server/composite/compalloc.c
@@ -48,6 +48,30 @@
#include "compint.h"
static void
+compScreenUpdate (ScreenPtr pScreen)
+{
+ compCheckTree (pScreen);
+ compPaintChildrenToWindow (pScreen->root);
+}
+
+static void
+compBlockHandler (int i,
+ pointer blockData,
+ pointer pTimeout,
+ pointer pReadmask)
+{
+ ScreenPtr pScreen = screenInfo.screens[i];
+ CompScreenPtr cs = GetCompScreen (pScreen);
+
+ pScreen->BlockHandler = cs->BlockHandler;
+ compScreenUpdate (pScreen);
+ (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask);
+
+ /* Next damage will restore the block handler */
+ cs->BlockHandler = NULL;
+}
+
+static void
compReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure)
{
WindowPtr pWin = (WindowPtr) closure;
@@ -55,8 +79,20 @@ compReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure)
CompScreenPtr cs = GetCompScreen (pScreen);
CompWindowPtr cw = GetCompWindow (pWin);
- cs->damaged = TRUE;
+ if (!cs->BlockHandler) {
+ cs->BlockHandler = pScreen->BlockHandler;
+ pScreen->BlockHandler = compBlockHandler;
+ }
cw->damaged = TRUE;
+
+ /* Mark the ancestors */
+ pWin = pWin->parent;
+ while (pWin) {
+ if (pWin->damagedDescendants)
+ break;
+ pWin->damagedDescendants = TRUE;
+ pWin = pWin->parent;
+ }
}
static void