summaryrefslogtreecommitdiff
path: root/composite/compinit.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2014-10-22 13:19:18 -0400
committerKeith Packard <keithp@keithp.com>2014-10-28 11:29:48 -0700
commit0fbbdb37c87b5824729f65c7fbac05223024fd27 (patch)
tree6121fc4beee137357881c943ed077b97cd0a53d2 /composite/compinit.c
parentda70c7d556bbf21ad495c26e982e2e0f2d7de6c1 (diff)
composite: Wrap GetSpans
GetSpans should flush composition from children to parent, just like GetImage and SourceValidate. Fortunately no one is likely to have noticed, since to hit this you're already deep into failure town. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'composite/compinit.c')
-rw-r--r--composite/compinit.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/composite/compinit.c b/composite/compinit.c
index 111c16e5d..10433a1f7 100644
--- a/composite/compinit.c
+++ b/composite/compinit.c
@@ -78,6 +78,7 @@ compCloseScreen(ScreenPtr pScreen)
pScreen->PositionWindow = cs->PositionWindow;
pScreen->GetImage = cs->GetImage;
+ pScreen->GetSpans = cs->GetSpans;
pScreen->SourceValidate = cs->SourceValidate;
free(cs);
@@ -151,6 +152,21 @@ compGetImage(DrawablePtr pDrawable,
}
static void
+compGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, int *pwidth,
+ int nspans, char *pdstStart)
+{
+ ScreenPtr pScreen = pDrawable->pScreen;
+ CompScreenPtr cs = GetCompScreen(pScreen);
+
+ pScreen->GetSpans = cs->GetSpans;
+ if (pDrawable->type == DRAWABLE_WINDOW)
+ compPaintChildrenToWindow((WindowPtr) pDrawable);
+ (*pScreen->GetSpans) (pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
+ cs->GetSpans = pScreen->GetSpans;
+ pScreen->GetSpans = compGetSpans;
+}
+
+static void
compSourceValidate(DrawablePtr pDrawable,
int x, int y,
int width, int height, unsigned int subWindowMode)
@@ -432,6 +448,9 @@ compScreenInit(ScreenPtr pScreen)
cs->GetImage = pScreen->GetImage;
pScreen->GetImage = compGetImage;
+ cs->GetSpans = pScreen->GetSpans;
+ pScreen->GetSpans = compGetSpans;
+
cs->SourceValidate = pScreen->SourceValidate;
pScreen->SourceValidate = compSourceValidate;