[PATCH] XShmGetImage: fix censoring

Nikolay Martynov mar.kolya at gmail.com
Thu Oct 12 01:56:12 UTC 2017


Hi.

One more kind ping on this. It has been sent quite a long time ago without
any reply. It would really appreciate if someone could let me know if this
is a correct mailing list or not?
Thanks!

2017-09-21 10:06 GMT-04:00 Nikolay Martynov <mar.kolya at gmail.com>:

> Hi.
>
> Just a kind ping. Is any additional information needed in this patch?
>
> Thanks!
>
> 2017-09-13 23:23 GMT-04:00 Nikolay Martynov <mar.kolya at gmail.com>:
> > It looks like offsets calculated during image censoring are wrong.
> > This results in black (empty) images returns.
> >
> > This fix is very similar to 6c6f09aac7f1d1367a042087b7681c7fdf1d1e0f
> > that was applied to XGetImage
> >
> > Visually this fixes chromium/firefox window sharing in multiscreen
> > configurations - without this patch most of the windows on 'secodnary'
> > screens are black.
> >
> > This also should fix https://bugs.freedesktop.org/show_bug.cgi?id=101730
> .
> >
> > Signed-off-by: Nikolay Martynov <mar.kolya at gmail.com>
> > ---
> >  Xext/shm.c | 8 ++------
> >  1 file changed, 2 insertions(+), 6 deletions(-)
> >
> > diff --git a/Xext/shm.c b/Xext/shm.c
> > index 91ea90b14..56555c7aa 100644
> > --- a/Xext/shm.c
> > +++ b/Xext/shm.c
> > @@ -650,9 +650,8 @@ ProcShmGetImage(ClientPtr client)
> >                 wBorderWidth((WindowPtr) pDraw) + (int) pDraw->height)
> >              return BadMatch;
> >          visual = wVisual(((WindowPtr) pDraw));
> > -        pVisibleRegion = NotClippedByChildren((WindowPtr) pDraw);
> > -        if (pVisibleRegion)
> > -            RegionTranslate(pVisibleRegion, -pDraw->x, -pDraw->y);
> > +        if (pDraw->type == DRAWABLE_WINDOW)
> > +            pVisibleRegion = &((WindowPtr) pDraw)->borderClip;
> >      }
> >      else {
> >          if (stuff->x < 0 ||
> > @@ -715,9 +714,6 @@ ProcShmGetImage(ClientPtr client)
> >          }
> >      }
> >
> > -    if (pVisibleRegion)
> > -        RegionDestroy(pVisibleRegion);
> > -
> >      if (client->swapped) {
> >          swaps(&xgi.sequenceNumber);
> >          swapl(&xgi.length);
> > --
> > 2.11.0
> >
>
>
>
> --
> Martynov Nikolay.
> Email: mar.kolya at gmail.com
>



-- 
Martynov Nikolay.
Email: mar.kolya at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg-devel/attachments/20171011/dcd270f4/attachment-0001.html>


More information about the xorg-devel mailing list