[PATCH] damage: Must translate initial window damage by window offset

Adam Jackson ajax at redhat.com
Fri Sep 20 15:19:12 PDT 2013


On Fri, 2013-09-20 at 14:45 -0500, Keith Packard wrote:
> Damage is reported relative to the drawable origin, but the window
> borderClip is absolute. Translate the region by the window position
> before reporting damage to adjust.

This makes initial window damage reports match subsequent damage reports
for the non-Xinerama case.  It breaks my current Xinerama patch, but
that's my doing, which I'll correct before sending v3.  Tested on Xvfb
plus a trivial hack to do right-of placement for screens (since
otherwise Xvfb's screens all end up with +0+0 for origin):

> --- a/hw/vfb/InitOutput.c
> +++ b/hw/vfb/InitOutput.c
> @@ -881,6 +881,13 @@ vfbScreenInit(ScreenPtr pScreen, int argc, char **argv)
>      pvfb->closeScreen = pScreen->CloseScreen;
>      pScreen->CloseScreen = vfbCloseScreen;
>  
> +    /* gross */
> +    {
> +        int i;
> +        for (i = 0; i < pScreen->myNum; i++)
> +            pScreen->x += screenInfo.screens[i]->width;
> +    }
> +
>      return ret;
>  
>  }                               /* end vfbScreenInit */

Reviewed-by: Adam Jackson <ajax at redhat.com>

- ajax



More information about the xorg-devel mailing list