[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg-devel
Subject:    Re: [PATCH] xinerama: Implement graphics exposures for window->pixmap copies (v2)
From:       Keith Packard <keithp () keithp ! com>
Date:       2014-09-29 20:17:33
Message-ID: 86k34mqizm.fsf () hiro ! keithp ! com
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Adam Jackson <ajax@redhat.com> writes:

> +        if (pGC->graphicsExposures) {
> +            RegionRec rgn;
> +            int dx, dy;
> +
> +            /* create region for source box */
> +            BoxRec sourceBox = { srcx, srcy, srcx + width, srcy + height };

Would be nice to have named member initializers here...

> +            RegionInit(&rgn, &sourceBox, 1);
> +
> +            dx = drawables[0]->x;
> +            dy = drawables[0]->y;
> +            if (srcIsRoot) {
> +                dx += screenInfo.screens[0]->x;
> +                dy += screenInfo.screens[0]->y;
> +            }

Are you sure you don't need this for every window? I thought every
window on each panoramiX screen was offset within the screen.

> +
> +            /* translate from source-relative to screen */
> +            RegionTranslate(&rgn, dx, dy);

You could just create sourceBox with the right coordinates here. Just sayin'

-- 
keith.packard@intel.com

[Attachment #5 (application/pgp-signature)]

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic