From: Michel Dänzer <michel.daen...@amd.com> Fixes incorrect clipping for redirected windows which don't happen to be located at the top left corner of the screen.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96742 Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- glamor/glamor_text.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/glamor/glamor_text.c b/glamor/glamor_text.c index c305305..cf165ca 100644 --- a/glamor/glamor_text.c +++ b/glamor/glamor_text.c @@ -446,16 +446,17 @@ glamor_image_text(DrawablePtr drawable, GCPtr gc, glamor_get_drawable_deltas(drawable, pixmap, &off_x, &off_y); if (width >= 0) { - box.x1 = off_x + drawable->x + x; - box.x2 = off_x + drawable->x + x + width; + box.x1 = drawable->x + x; + box.x2 = drawable->x + x + width; } else { - box.x1 = off_x + drawable->x + x + width; - box.x2 = off_x + drawable->x + x; + box.x1 = drawable->x + x + width; + box.x2 = drawable->x + x; } - box.y1 = off_y + drawable->y + y - gc->font->info.fontAscent; - box.y2 = off_y + drawable->y + y + gc->font->info.fontDescent; + box.y1 = drawable->y + y - gc->font->info.fontAscent; + box.y2 = drawable->y + y + gc->font->info.fontDescent; RegionInit(®ion, &box, 1); RegionIntersect(®ion, ®ion, gc->pCompositeClip); + RegionTranslate(®ion, off_x, off_y); glamor_solid_boxes(pixmap, RegionRects(®ion), RegionNumRects(®ion), gc->bgPixel); RegionUninit(®ion); } -- 2.8.1 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel