Commit 0fbbdb37 authored by Adam Jackson's avatar Adam Jackson 🎧 Committed by Keith Packard
Browse files

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's avatarAdam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
parent da70c7d5
......@@ -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);
......@@ -150,6 +151,21 @@ compGetImage(DrawablePtr pDrawable,
pScreen->GetImage = compGetImage;
}
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,
......@@ -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;
......
......@@ -168,6 +168,7 @@ typedef struct _CompScreen {
CompOverlayClientPtr pOverlayClients;
GetImageProcPtr GetImage;
GetSpansProcPtr GetSpans;
SourceValidateProcPtr SourceValidate;
} CompScreenRec, *CompScreenPtr;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment