summaryrefslogtreecommitdiff
path: root/composite/compalloc.c
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2018-10-24 15:59:35 +0100
committerJon Turney <jon.turney@dronecode.org.uk>2018-10-24 15:59:35 +0100
commit8076029c5ca81dee348126cd7fe199b248b7809b (patch)
tree13c0f76a8100980c37397d29d4725cecc6d3ab83 /composite/compalloc.c
parent7d416f031b61d6d6be376ba45018b135505980a7 (diff)
parent2a0c6c15c35cd262e7cdb86dcc43cb1aeb714c8e (diff)
Merge tag 'xorg-server-1.20.2' into cygwin-release-1.20xserver-cygwin-1.20.2-1
xorg-server-1.20.2
Diffstat (limited to 'composite/compalloc.c')
-rw-r--r--composite/compalloc.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/composite/compalloc.c b/composite/compalloc.c
index 433dc820a..3e2f14fb0 100644
--- a/composite/compalloc.c
+++ b/composite/compalloc.c
@@ -47,24 +47,18 @@
#include "compint.h"
-static void
-compScreenUpdate(ScreenPtr pScreen)
-{
- compCheckTree(pScreen);
- compPaintChildrenToWindow(pScreen->root);
-}
-
-static void
-compBlockHandler(ScreenPtr pScreen, void *pTimeout)
+static Bool
+compScreenUpdate(ClientPtr pClient, void *closure)
{
+ ScreenPtr pScreen = closure;
CompScreenPtr cs = GetCompScreen(pScreen);
- pScreen->BlockHandler = cs->BlockHandler;
- compScreenUpdate(pScreen);
- (*pScreen->BlockHandler) (pScreen, pTimeout);
+ compCheckTree(pScreen);
+ compPaintChildrenToWindow(pScreen->root);
- /* Next damage will restore the block handler */
- cs->BlockHandler = NULL;
+ /* Next damage will restore the worker */
+ cs->pendingScreenUpdate = FALSE;
+ return TRUE;
}
void
@@ -87,9 +81,9 @@ compReportDamage(DamagePtr pDamage, RegionPtr pRegion, void *closure)
CompScreenPtr cs = GetCompScreen(pScreen);
CompWindowPtr cw = GetCompWindow(pWin);
- if (!cs->BlockHandler) {
- cs->BlockHandler = pScreen->BlockHandler;
- pScreen->BlockHandler = compBlockHandler;
+ if (!cs->pendingScreenUpdate) {
+ QueueWorkProc(compScreenUpdate, serverClient, pScreen);
+ cs->pendingScreenUpdate = TRUE;
}
cw->damaged = TRUE;