[PATCH] xinerama: Implement graphics exposures for window->pixmap copies (v2)

Keith Packard keithp at keithp.com
Mon Sep 29 13:17:33 PDT 2014


Adam Jackson <ajax at 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 at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20140929/eda69d58/attachment-0001.sig>


More information about the xorg-devel mailing list