Commit b89e6dbd authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Keith Packard
Browse files

composite: Add SourceValidate wrapper



When SourceValidate is performed on a window with IncludeInferiors
sub-window mode, force an immediate update of all the automatically
redirected windows, so that the current window contents will be up
to date.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
Reviewed-by: Daniel Stone's avatarDaniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
parent 84154954
......@@ -78,6 +78,7 @@ compCloseScreen (int index, ScreenPtr pScreen)
pScreen->PositionWindow = cs->PositionWindow;
pScreen->GetImage = cs->GetImage;
pScreen->SourceValidate = cs->SourceValidate;
free(cs);
dixSetPrivate(&pScreen->devPrivates, CompScreenPrivateKey, NULL);
......@@ -150,6 +151,24 @@ compGetImage (DrawablePtr pDrawable,
pScreen->GetImage = compGetImage;
}
static void compSourceValidate(DrawablePtr pDrawable,
int x, int y,
int width, int height,
unsigned int subWindowMode)
{
ScreenPtr pScreen = pDrawable->pScreen;
CompScreenPtr cs = GetCompScreen (pScreen);
pScreen->SourceValidate = cs->SourceValidate;
if (pDrawable->type == DRAWABLE_WINDOW && subWindowMode == IncludeInferiors)
compScreenUpdate (pScreen);
if (pScreen->SourceValidate)
(*pScreen->SourceValidate) (pDrawable, x, y, width, height,
subWindowMode);
cs->SourceValidate = pScreen->SourceValidate;
pScreen->SourceValidate = compSourceValidate;
}
/*
* Add alternate visuals -- always expose an ARGB32 and RGB24 visual
*/
......@@ -385,6 +404,9 @@ compScreenInit (ScreenPtr pScreen)
cs->GetImage = pScreen->GetImage;
pScreen->GetImage = compGetImage;
cs->SourceValidate = pScreen->SourceValidate;
pScreen->SourceValidate = compSourceValidate;
dixSetPrivate(&pScreen->devPrivates, CompScreenPrivateKey, cs);
RegisterRealChildHeadProc(CompositeRealChildHead);
......
......@@ -160,6 +160,7 @@ typedef struct _CompScreen {
CompOverlayClientPtr pOverlayClients;
GetImageProcPtr GetImage;
SourceValidateProcPtr SourceValidate;
} CompScreenRec, *CompScreenPtr;
extern DevPrivateKeyRec CompScreenPrivateKeyRec;
......
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