xserver: Rootless: Correct border rendering on parent-relative windows

Yaakov (Cygwin/X) yselkowitz at users.sourceforge.net
Wed Oct 14 21:44:25 PDT 2009


On 28/09/2009 12:48, Jeremy Huddleston wrote:
> commit b3415187e92960cbff784108b5a3a8d130dc34c5
> Author: Jeremy Huddleston<jeremyhu at freedesktop.org>
> Date:   Sun Sep 27 23:09:51 2009 -0700
>
>      Rootless: Correct border rendering on parent-relative windows
>
>      Resurected code from the punted RootlessPaintBackground/Border and added it conditionally to miPaintWindow
>      (cherry picked from commit cf2e3312cff3f341e9edba8c321a4ca7ffd8748e)
>
> diff --git a/mi/miexpose.c b/mi/miexpose.c
> index 6ce56ee..1c9c3a4 100644
> --- a/mi/miexpose.c
> +++ b/mi/miexpose.c
> @@ -518,6 +518,14 @@ miWindowExposures( WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed)
>   	REGION_DESTROY( pWin->drawable.pScreen, exposures);
>   }
>
> +#ifdef ROOTLESS
> +/* Ugly, ugly, but we lost our hooks into miPaintWindow... =/ */
> +void RootlessSetPixmapOfAncestors(WindowPtr pWin);
> +void RootlessStartDrawing(WindowPtr pWin);
> +void RootlessDamageRegion(WindowPtr pWin, RegionPtr prgn);
> +Bool IsFramedWindow(WindowPtr pWin);
> +#endif
> +
>   void
>   miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
>   {
> @@ -543,6 +551,19 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
>       Bool	solid = TRUE;
>       DrawablePtr	drawable =&pWin->drawable;
>
> +#ifdef ROOTLESS
> +    if(IsFramedWindow(pWin)) {
> +        RootlessStartDrawing(pWin);
> +        RootlessDamageRegion(pWin, prgn);
> +
> +        if(pWin->backgroundState == ParentRelative) {
> +            if((what == PW_BACKGROUND) ||
> +               (what == PW_BORDER&&  !pWin->borderIsPixel))
> +                RootlessSetPixmapOfAncestors(pWin);
> +        }
> +    }
> +#endif
> +
>       if (what == PW_BACKGROUND)
>       {
>   	while (pWin->backgroundState == ParentRelative)

Jeremy,

This commit adds a dependency on miext/rootless/librootless.la to 
mi/libmi.la, which didn't exist in 1.6.  The result on Cygwin, where we 
also use the rootless code (for WindowsWM extension support), is that 
the other DDXs (Xnext/Xvfb/Xephyr/Xfake) which we build alongside XWin 
fail to link:

../../../mi/.libs/libmi.a(miexpose.o):miexpose.c:(.text+0xc9): undefined 
reference to `_IsFramedWindow'
../../../mi/.libs/libmi.a(miexpose.o):miexpose.c:(.text+0x274): 
undefined reference to `_RootlessStartDrawing'
../../../mi/.libs/libmi.a(miexpose.o):miexpose.c:(.text+0x283): 
undefined reference to `_RootlessDamageRegion'
../../../mi/.libs/libmi.a(miexpose.o):miexpose.c:(.text+0x370): 
undefined reference to `_RootlessSetPixmapOfAncestors'
collect2: ld returned 1 exit status

Can this code be moved back out of mi, or do we need to treat rootless 
like other miext libraries, so that all the DDXs can be built at once?


Yaakov
Cygwin/X


More information about the xorg-devel mailing list