summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-12 10:45:35 +0100
committerAndras Timar <andras.timar@collabora.com>2017-04-12 17:24:45 +0200
commit186f0f57a08d204a3e7bdefd8cdccb8027bd0661 (patch)
treeff63b7f588b7dadb818fe05b0a4a605151a786fa /vcl
parente227b6fe086b2caf30ca489f4d74a9f9a725c635 (diff)
infinite SetDefaultSize->SetPosSize->SetDefaultSize
https://retrace.fedoraproject.org/faf/reports/1278627/ presumably the 'optimal' starting size hits the invalid size path causing another attempt usin the optimal size, so force a valid initial fallback size Change-Id: I6c38ee5e1b90ce41a4550c8a8370e791f5c351b0 (cherry picked from commit 4930acb18bbd145fd995084cd95e3e9d631424ed) Reviewed-on: https://gerrit.libreoffice.org/36453 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 3e4e13300db6a0c2c60dbe733d96ff5a7b0d32e5)
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/dialog.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index eef4c5ab5018..bff1f27a9613 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -662,7 +662,8 @@ Size bestmaxFrameSizeForScreenSize(const Size &rScreenSize)
else
h -= 100;
- return Size(w, h);
+ return Size(std::max<long>(w, 640 - 15),
+ std::max<long>(h, 480 - 50));
}
void Dialog::StateChanged( StateChangedType nType )