don't place windows with invalid geometry

if a window has a size of 0x0, doesn't have its final place yet, so it can't be reliably
placed centered yet
icc-effect-5.26.4
Marco Martin 2021-06-09 14:30:09 +02:00
parent 811beb94e0
commit ada29cfc9a
1 changed files with 4 additions and 0 deletions

View File

@ -458,6 +458,10 @@ void Placement::placeCentered(AbstractClient* c, const QRect& area, Policy /*nex
{
Q_ASSERT(area.isValid());
if (!c->frameGeometry().isValid()) {
return;
}
const int xp = area.left() + (area.width() - c->width()) / 2;
const int yp = area.top() + (area.height() - c->height()) / 2;