diff options
Diffstat (limited to 'mi')
-rw-r--r-- | mi/mi.h | 10 | ||||
-rw-r--r-- | mi/miinitext.c | 25 | ||||
-rw-r--r-- | mi/mivaltree.c | 39 |
3 files changed, 64 insertions, 10 deletions
@@ -495,6 +495,16 @@ extern int miShapedWindowIn( int /*y*/ ); +typedef void +(*SetRedirectBorderClipProcPtr) (WindowPtr pWindow, RegionPtr pRegion); + +typedef RegionPtr +(*GetRedirectBorderClipProcPtr) (WindowPtr pWindow); + +void +miRegisterRedirectBorderClipProc (SetRedirectBorderClipProcPtr setBorderClip, + GetRedirectBorderClipProcPtr getBorderClip); + extern int miValidateTree( WindowPtr /*pParent*/, WindowPtr /*pChild*/, diff --git a/mi/miinitext.c b/mi/miinitext.c index 6afc66ea0..ec4ae1aa4 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -1,4 +1,4 @@ -/* $XdotOrg: xc/programs/Xserver/mi/miinitext.c,v 1.6 2004/07/31 01:37:47 stukreit Exp $ */ +/* $XdotOrg: xc/programs/Xserver/mi/miinitext.c,v 1.7 2004/07/31 04:23:21 kem Exp $ */ /* $XFree86: xc/programs/Xserver/mi/miinitext.c,v 3.67 2003/01/12 02:44:27 dawes Exp $ */ /*********************************************************** @@ -282,6 +282,9 @@ extern void XFixesExtensionInit(INITARGS); #ifdef DAMAGE extern void DamageExtensionInit(INITARGS); #endif +#ifdef COMPOSITE +extern void CompositeExtensionInit(INITARGS); +#endif /* The following is only a small first step towards run-time * configurable extensions. @@ -456,6 +459,10 @@ InitExtensions(argc, argv) DPSExtensionInit(); #endif #endif +#ifdef XFIXES + /* must be before Render to layer DisplayCursor correctly */ + XFixesExtensionInit(); +#endif #ifdef RENDER if (!noRenderExtension) RenderExtensionInit(); #endif @@ -471,12 +478,12 @@ InitExtensions(argc, argv) #ifdef XEVIE if (!noXevieExtension) XevieExtensionInit(); #endif -#ifdef XFIXES - XFixesExtensionInit(); -#endif #ifdef DAMAGE DamageExtensionInit(); #endif +#ifdef COMPOSITE + CompositeExtensionInit (); +#endif } void @@ -590,6 +597,10 @@ static ExtensionModule staticExtensions[] = { #ifdef PANORAMIX { PanoramiXExtensionInit, PANORAMIX_PROTOCOL_NAME, &noPanoramiXExtension, NULL, NULL }, #endif +#ifdef XFIXES + /* must be before Render to layer DisplayCursor correctly */ + { XFixesExtensionInit, "XFIXES", NULL, NULL, NULL }, +#endif #ifdef XF86BIGFONT { XFree86BigfontExtensionInit, XF86BIGFONTNAME, NULL, NULL, NULL }, #endif @@ -602,9 +613,9 @@ static ExtensionModule staticExtensions[] = { #ifdef DAMAGE { DamageExtensionInit, "DAMAGE", NULL, NULL }, #endif -#ifdef XFIXES - { XFixesExtensionInit, "XFIXES", NULL, NULL }, -#endif +#ifdef COMPOSITE + { CompositeExtensionInit, "COMPOSITE", NULL, NULL }, +#endif #ifdef XEVIE { XevieExtensionInit, "XEVIE", &noXevieExtension, NULL }, #endif 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++; } |