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
This commit is contained in:
parent
9302e84b95
commit
609833e880
1 changed files with 3 additions and 2 deletions
|
@ -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…
Reference in a new issue