summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2012-07-16 11:11:06 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-16 16:30:55 +0200
commit855bac63682c0f6cb604f1b41956a7b13e5d0518 (patch)
tree3038296140fc4fbe211071c73b376864ef93cf03 /src
parenta89c7e4020591e27ba265fa082b83440f2afa3b2 (diff)
QWidget::showFullScreen fixed for widgets with valid size hint
Ensure the initial size is valid, since we store it as normalGeometry below. Task-number: QTBUG-26226 Change-Id: I3a55c389a48504699942930063089c80657687a0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index 9a31373981..3661a0802c 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -612,6 +612,10 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
Qt::WindowState newEffectiveState = effectiveState(newstate);
Qt::WindowState oldEffectiveState = effectiveState(oldstate);
if (isWindow() && newEffectiveState != oldEffectiveState) {
+ // Ensure the initial size is valid, since we store it as normalGeometry below.
+ if (!testAttribute(Qt::WA_Resized) && !isVisible())
+ adjustSize();
+
d->createTLExtra();
if (oldEffectiveState == Qt::WindowNoState)
d->topData()->normalGeometry = geometry();