From 7f71c891118aa3d22820bd998399bd046fb65126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sat, 23 May 2015 10:20:04 +0200 Subject: [PATCH] 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 --- geometry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geometry.cpp b/geometry.cpp index a61ecb12fd..dbcb480198 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -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); }