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
wilder/Plasma/6.2
Marco Martin 2 years ago
parent 9302e84b95
commit 609833e880
  1. 5
      src/scene/surfaceitem_x11.cpp

@ -157,11 +157,12 @@ QList<QRectF> SurfaceItemX11::shape() const
{
const QRectF clipRect = m_window->clientGeometry().translated(-m_window->bufferGeometry().topLeft());
QList<QRectF> shape = m_window->shapeRegion();
QList<QRectF> shapeRegion;
// bounded to clipRect
for (QRectF &shapePart : shape) {
shapePart = shapePart.intersected(clipRect);
shapeRegion += shapePart.intersected(clipRect);
}
return shape;
return shapeRegion;
}
QRegion SurfaceItemX11::opaque() const

Loading…
Cancel
Save