From 609833e88094ebdf120a8930b3e19b202d31965d Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 11 Mar 2024 12:42:21 +0100 Subject: [PATCH] Properly intersect the shape with clipRect That for loop in the end didn't have any effect, actually compute the final region and return that one --- src/scene/surfaceitem_x11.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/scene/surfaceitem_x11.cpp b/src/scene/surfaceitem_x11.cpp index 46b93764c6..94baa17b7d 100644 --- a/src/scene/surfaceitem_x11.cpp +++ b/src/scene/surfaceitem_x11.cpp @@ -157,11 +157,12 @@ QList SurfaceItemX11::shape() const { const QRectF clipRect = m_window->clientGeometry().translated(-m_window->bufferGeometry().topLeft()); QList shape = m_window->shapeRegion(); + QList shapeRegion; // bounded to clipRect for (QRectF &shapePart : shape) { - shapePart = shapePart.intersected(clipRect); + shapeRegion += shapePart.intersected(clipRect); } - return shape; + return shapeRegion; } QRegion SurfaceItemX11::opaque() const