aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/composite/compinit.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-01-08 21:42:21 +0000
committermarha <marha@users.sourceforge.net>2011-01-08 21:42:21 +0000
commitee97a3165b1f07f011cf95804590925b81e8ec96 (patch)
tree58aa78664ad871145a5a0149f9ad60f140f934aa /xorg-server/composite/compinit.c
parentc8a34ce9318446bcd8e91e601525a61d6847f28f (diff)
parent432768f75da13ee5343957df6ce5cd316a62929f (diff)
downloadvcxsrv-ee97a3165b1f07f011cf95804590925b81e8ec96.tar.gz
vcxsrv-ee97a3165b1f07f011cf95804590925b81e8ec96.tar.bz2
vcxsrv-ee97a3165b1f07f011cf95804590925b81e8ec96.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/composite/compinit.c')
-rw-r--r--xorg-server/composite/compinit.c62
1 files changed, 38 insertions, 24 deletions
diff --git a/xorg-server/composite/compinit.c b/xorg-server/composite/compinit.c
index 98b8d0565..291b759be 100644
--- a/xorg-server/composite/compinit.c
+++ b/xorg-server/composite/compinit.c
@@ -61,7 +61,6 @@ compCloseScreen (int index, ScreenPtr pScreen)
free(cs->alternateVisuals);
pScreen->CloseScreen = cs->CloseScreen;
- pScreen->BlockHandler = cs->BlockHandler;
pScreen->InstallColormap = cs->InstallColormap;
pScreen->ChangeWindowAttributes = cs->ChangeWindowAttributes;
pScreen->ReparentWindow = cs->ReparentWindow;
@@ -78,6 +77,9 @@ compCloseScreen (int index, ScreenPtr pScreen)
pScreen->CopyWindow = cs->CopyWindow;
pScreen->PositionWindow = cs->PositionWindow;
+ pScreen->GetImage = cs->GetImage;
+ pScreen->SourceValidate = cs->SourceValidate;
+
free(cs);
dixSetPrivate(&pScreen->devPrivates, CompScreenPrivateKey, NULL);
ret = (*pScreen->CloseScreen) (index, pScreen);
@@ -131,32 +133,40 @@ compChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
}
static void
-compScreenUpdate (ScreenPtr pScreen)
+compGetImage (DrawablePtr pDrawable,
+ int sx, int sy,
+ int w, int h,
+ unsigned int format,
+ unsigned long planemask,
+ char *pdstLine)
{
- CompScreenPtr cs = GetCompScreen (pScreen);
+ ScreenPtr pScreen = pDrawable->pScreen;
+ CompScreenPtr cs = GetCompScreen (pScreen);
- compCheckTree (pScreen);
- if (cs->damaged)
- {
- compWindowUpdate (pScreen->root);
- cs->damaged = FALSE;
- }
+ pScreen->GetImage = cs->GetImage;
+ if (pDrawable->type == DRAWABLE_WINDOW)
+ compPaintChildrenToWindow ((WindowPtr) pDrawable);
+ (*pScreen->GetImage) (pDrawable, sx, sy, w, h, format, planemask, pdstLine);
+ cs->GetImage = pScreen->GetImage;
+ pScreen->GetImage = compGetImage;
}
-static void
-compBlockHandler (int i,
- pointer blockData,
- pointer pTimeout,
- pointer pReadmask)
+static void compSourceValidate(DrawablePtr pDrawable,
+ int x, int y,
+ int width, int height,
+ unsigned int subWindowMode)
{
- ScreenPtr pScreen = screenInfo.screens[i];
- CompScreenPtr cs = GetCompScreen (pScreen);
+ ScreenPtr pScreen = pDrawable->pScreen;
+ CompScreenPtr cs = GetCompScreen (pScreen);
- pScreen->BlockHandler = cs->BlockHandler;
- compScreenUpdate (pScreen);
- (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask);
- cs->BlockHandler = pScreen->BlockHandler;
- pScreen->BlockHandler = compBlockHandler;
+ pScreen->SourceValidate = cs->SourceValidate;
+ if (pDrawable->type == DRAWABLE_WINDOW && subWindowMode == IncludeInferiors)
+ compPaintChildrenToWindow ((WindowPtr) pDrawable);
+ if (pScreen->SourceValidate)
+ (*pScreen->SourceValidate) (pDrawable, x, y, width, height,
+ subWindowMode);
+ cs->SourceValidate = pScreen->SourceValidate;
+ pScreen->SourceValidate = compSourceValidate;
}
/*
@@ -331,7 +341,6 @@ compScreenInit (ScreenPtr pScreen)
if (!cs)
return FALSE;
- cs->damaged = FALSE;
cs->overlayWid = FakeClientID(0);
cs->pOverlayWin = NULL;
cs->pOverlayClients = NULL;
@@ -387,12 +396,17 @@ compScreenInit (ScreenPtr pScreen)
cs->ChangeWindowAttributes = pScreen->ChangeWindowAttributes;
pScreen->ChangeWindowAttributes = compChangeWindowAttributes;
- cs->BlockHandler = pScreen->BlockHandler;
- pScreen->BlockHandler = compBlockHandler;
+ cs->BlockHandler = NULL;
cs->CloseScreen = pScreen->CloseScreen;
pScreen->CloseScreen = compCloseScreen;
+ cs->GetImage = pScreen->GetImage;
+ pScreen->GetImage = compGetImage;
+
+ cs->SourceValidate = pScreen->SourceValidate;
+ pScreen->SourceValidate = compSourceValidate;
+
dixSetPrivate(&pScreen->devPrivates, CompScreenPrivateKey, cs);
RegisterRealChildHeadProc(CompositeRealChildHead);