summaryrefslogtreecommitdiff
path: root/composite
diff options
context:
space:
mode:
Diffstat (limited to 'composite')
-rw-r--r--composite/compinit.c22
-rw-r--r--composite/compint.h1
2 files changed, 23 insertions, 0 deletions
diff --git a/composite/compinit.c b/composite/compinit.c
index e1a765684..74689be1f 100644
--- a/composite/compinit.c
+++ b/composite/compinit.c
@@ -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);
diff --git a/composite/compint.h b/composite/compint.h
index c188bf1c5..681f651e9 100644
--- a/composite/compint.h
+++ b/composite/compint.h
@@ -160,6 +160,7 @@ typedef struct _CompScreen {
CompOverlayClientPtr pOverlayClients;
GetImageProcPtr GetImage;
+ SourceValidateProcPtr SourceValidate;
} CompScreenRec, *CompScreenPtr;
extern DevPrivateKeyRec CompScreenPrivateKeyRec;