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
This commit is contained in:
Marco Martin 2021-06-09 14:30:09 +02:00
parent 811beb94e0
commit ada29cfc9a

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;