Add missing size check in Placement::placeZeroCornered()
The size is required to cascade the window.
This commit is contained in:
parent
913a850584
commit
f8d8589ce7
1 changed files with 6 additions and 1 deletions
|
@ -468,8 +468,13 @@ void Placement::placeZeroCornered(Window *c, const QRect &area, PlacementPolicy
|
||||||
{
|
{
|
||||||
Q_ASSERT(area.isValid());
|
Q_ASSERT(area.isValid());
|
||||||
|
|
||||||
|
const QSizeF size = c->size();
|
||||||
|
if (size.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// get the maximum allowed windows space and desk's origin
|
// get the maximum allowed windows space and desk's origin
|
||||||
const QRectF placed = cascadeIfCovering(c, QRectF(area.topLeft(), c->size()), area);
|
const QRectF placed = cascadeIfCovering(c, QRectF(area.topLeft(), size), area);
|
||||||
c->move(placed.topLeft());
|
c->move(placed.topLeft());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue