XShmGetImage: fix censoring
It looks like offsets calculated during image censoring are wrong. This results in black (empty) images returns. This fix is very similar to6c6f09aac7
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@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit885636b7d4
)
This commit is contained in:
parent
a6776111b2
commit
cd5076a50c
|
@ -650,9 +650,8 @@ ProcShmGetImage(ClientPtr client)
|
||||||
wBorderWidth((WindowPtr) pDraw) + (int) pDraw->height)
|
wBorderWidth((WindowPtr) pDraw) + (int) pDraw->height)
|
||||||
return BadMatch;
|
return BadMatch;
|
||||||
visual = wVisual(((WindowPtr) pDraw));
|
visual = wVisual(((WindowPtr) pDraw));
|
||||||
pVisibleRegion = NotClippedByChildren((WindowPtr) pDraw);
|
if (pDraw->type == DRAWABLE_WINDOW)
|
||||||
if (pVisibleRegion)
|
pVisibleRegion = &((WindowPtr) pDraw)->borderClip;
|
||||||
RegionTranslate(pVisibleRegion, -pDraw->x, -pDraw->y);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (stuff->x < 0 ||
|
if (stuff->x < 0 ||
|
||||||
|
@ -715,9 +714,6 @@ ProcShmGetImage(ClientPtr client)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pVisibleRegion)
|
|
||||||
RegionDestroy(pVisibleRegion);
|
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&xgi.sequenceNumber);
|
swaps(&xgi.sequenceNumber);
|
||||||
swapl(&xgi.length);
|
swapl(&xgi.length);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user