diff options
author | Eric Anholt <anholt@freebsd.org> | 2004-07-31 08:24:14 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2004-07-31 08:24:14 +0000 |
commit | d690556d496c7331bd112903a0c9e6553c7d3342 (patch) | |
tree | 0e0016e04d05d6cbcdfb689ddb05d8f3a928dadf /mi/mivaltree.c | |
parent | 8763cca7f9927bd6c9caf804bf09dcfea929eed0 (diff) |
Integrate COMPOSITEWRAP branch including composite wrapper. This code still
has several issues, including:
- CopyWindow and PaintWindow wrappers missing (will be done soon)
- Some segfaults seen in the Render wrappers.
- Xprt server build breaks with Composite.
- DDXs must be recompiled for Composite due to VisualRec size change.
- Composite bugs pointed out by Deron Johnson in email.
Also, reorder XFixes initialization according to comments by Keith which
are also in xserver CVS.
Diffstat (limited to 'mi/mivaltree.c')
-rw-r--r-- | mi/mivaltree.c | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/mi/mivaltree.c b/mi/mivaltree.c index 1bbbc20fc..6036f6057 100644 --- a/mi/mivaltree.c +++ b/mi/mivaltree.c @@ -1,5 +1,5 @@ /* $Xorg: mivaltree.c,v 1.4 2001/02/09 02:05:22 xorgcvs Exp $ */ -/* $XdotOrg$ */ +/* $XdotOrg: xc/programs/Xserver/mi/mivaltree.c,v 1.2.2.1 2004/07/30 06:54:42 anholt Exp $ */ /* * mivaltree.c -- * Functions for recalculating window clip lists. Main function @@ -167,6 +167,17 @@ miShapedWindowIn (pScreen, universe, bounding, rect, x, y) } #endif +static GetRedirectBorderClipProcPtr miGetRedirectBorderClipProc; +static SetRedirectBorderClipProcPtr miSetRedirectBorderClipProc; + +void +miRegisterRedirectBorderClipProc (SetRedirectBorderClipProcPtr setBorderClip, + GetRedirectBorderClipProcPtr getBorderClip) +{ + miSetRedirectBorderClipProc = setBorderClip; + miGetRedirectBorderClipProc = getBorderClip; +} + #define HasParentRelativeBorder(w) (!(w)->borderIsPixel && \ HasBorder(w) && \ (w)->backgroundState == ParentRelative) @@ -264,6 +275,18 @@ miComputeClips ( ((pParent->eventMask | wOtherEventMasks(pParent)) & VisibilityChangeMask)) SendVisibilityNotify(pParent); +#ifdef COMPOSITE + /* + * In redirected drawing case, reset universe to borderSize + */ + if (pParent->redirectDraw) + { + if (miSetRedirectBorderClipProc) + (*miSetRedirectBorderClipProc) (pParent, universe); + REGION_COPY(pScreen, universe, &pParent->borderSize); + } +#endif + dx = pParent->drawable.x - pParent->valdata->before.oldAbsCorner.x; dy = pParent->drawable.y - pParent->valdata->before.oldAbsCorner.y; @@ -640,7 +663,12 @@ miValidateTree (pParent, pChild, kind) { if (pWin->valdata) { - REGION_APPEND( pScreen, &totalClip, &pWin->borderClip); + RegionPtr pBorderClip = &pWin->borderClip; +#ifdef COMPOSITE + if (pWin->redirectDraw && miGetRedirectBorderClipProc) + pBorderClip = (*miGetRedirectBorderClipProc)(pWin); +#endif + REGION_APPEND( pScreen, &totalClip, pBorderClip ); if (pWin->viewable) viewvals++; } @@ -654,7 +682,12 @@ miValidateTree (pParent, pChild, kind) { if (pWin->valdata) { - REGION_APPEND( pScreen, &totalClip, &pWin->borderClip); + RegionPtr pBorderClip = &pWin->borderClip; +#ifdef COMPOSITE + if (pWin->redirectDraw && miGetRedirectBorderClipProc) + pBorderClip = (*miGetRedirectBorderClipProc)(pWin); +#endif + REGION_APPEND( pScreen, &totalClip, pBorderClip ); if (pWin->viewable) viewvals++; } |