Commit 8ba77139 authored by David Edmundson's avatar David Edmundson Committed by Vlad Zahorodnii
Browse files

Fix truncation in quad clipping

Transforms may not be on the logical grid in the case of CSD clients
with scaling.
parent eccfbbd6
Pipeline #231848 passed with stage
in 13 minutes and 2 seconds
......@@ -288,15 +288,14 @@ static WindowQuadList clipQuads(const Item *item, const SceneOpenGL::RenderConte
const WindowQuadList quads = item->quads();
if (context->clip != infiniteRegion() && !context->hardwareClipping) {
const QPoint offset = context->, 0));
const QPointF offset = context->, 0));
WindowQuadList ret;
// split all quads in bounding rect with the actual rects in the region
for (const WindowQuad &quad : qAsConst(quads)) {
for (const QRect &r : qAsConst(context->clip)) {
const QRectF rf(r.translated(-offset));
const QRectF rf(QRectF(r).translated(-offset));
const QRectF quadRect(QPointF(quad.left(),, QPointF(quad.right(), quad.bottom()));
const QRectF &intersected = rf.intersected(quadRect);
if (intersected.isValid()) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment