On Fri, 2016-09-23 at 01:15 +0300, Keith Packard wrote:
> +static void
> +FixCoordModePrevious(int npt, xPoint *ppt)
> +{
> + int x, y;
> +
> + x = ppt->x;
> + y = ppt->y;
> + npt--;
> + while (npt--) {
> + ppt++;
> + x = (ppt->x += x);
> + y = (ppt->y += y);
> + }
> +}
You want to make this non-static, so in the xinerama case you can do
this translation once at the top level.
> @@ -1785,9 +1800,12 @@ ProcPolyPoint(ClientPtr client)
> }
> VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
> npoint = bytes_to_int32((client->req_len << 2) - sizeof(xPolyPointReq));
> - if (npoint)
> - (*pGC->ops->PolyPoint) (pDraw, pGC, stuff->coordMode, npoint,
> + if (npoint) {
> + if (stuff->coordMode == CoordModePrevious)
> + FixCoordModePrevious(npoint, (xPoint *) &stuff[1]);
> + (*pGC->ops->PolyPoint) (pDraw, pGC, npoint,
> (xPoint *) &stuff[1]);
> + }
> return Success;
> }
You're not correcting stuff->coordMode in place, which means under
xinerama you'll mutate geometry once per screen, which ain't right.
- ajax
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel