aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/composite/compalloc.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-01-08 19:40:59 +0000
committermarha <marha@users.sourceforge.net>2011-01-08 19:40:59 +0000
commit432768f75da13ee5343957df6ce5cd316a62929f (patch)
treeb02a3961540984c3d2caf783a6f0854b9b00f92a /xorg-server/composite/compalloc.c
parent43b6c9073b8aad1170536ae5c6a5a019617659f1 (diff)
downloadvcxsrv-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/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 4d0d4ad1c..745166621 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