don't nuke both dims if undecorated frame isEmpty

isEmpty hits if one dimension is <= 0 - the other one
can be absolutely valid, so preserve it.

REVIEW: 123882
This commit is contained in:
Thomas Lübking 2015-05-23 10:20:04 +02:00
parent 41be18e317
commit 7f71c89111

View file

@ -1243,7 +1243,7 @@ QSize Client::adjustedSize(const QSize& frame, Sizemode mode) const
QSize wsize(frame.width() - (borderLeft() + borderRight()),
frame.height() - (borderTop() + borderBottom()));
if (wsize.isEmpty())
wsize = QSize(1, 1);
wsize = QSize(qMax(wsize.width(), 1), qMax(wsize.height(), 1));
return sizeForClientSize(wsize, mode, false);
}