summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2009-11-13 11:19:56 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2009-11-13 11:21:29 (GMT)
commitee8e0fc9f32a84bd1e1673c9756044d62ecaebf5 (patch)
tree9997824105b5dbbf899798a27a5d79c54a725ae4 /src
parent2b243d590fcd6ce0c94fbf8adb1a4bd19b1c4685 (diff)
downloadQt-ee8e0fc9f32a84bd1e1673c9756044d62ecaebf5.zip
Qt-ee8e0fc9f32a84bd1e1673c9756044d62ecaebf5.tar.gz
Qt-ee8e0fc9f32a84bd1e1673c9756044d62ecaebf5.tar.bz2
Fixed maximized dialogs losing maximized status on orientation switch
If maximized dialog had minimum size that didn't fully fit to the screen, it lost its maximized status when orientation was switched, because of the logic that assumed that if a window is resized, it must no longer be maximized. Skipped this assumption for cases where resize occurs because enforcement of the minimum size of the window. Task-number: QTBUG-4671 Reviewed-by: Janne Anttila Reviewed-by: Sami Merila
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qwidget_s60.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 504a538..1acdfda 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -213,6 +213,15 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
if ((q->windowType() == Qt::Desktop))
return;
+
+ QPoint oldPos(q->pos());
+ QSize oldSize(q->size());
+ QRect oldGeom(data.crect);
+
+ // Lose maximized status if deliberate resize
+ if (w != oldSize.width() || h != oldSize.height())
+ data.window_state &= ~Qt::WindowMaximized;
+
if (extra) { // any size restrictions?
w = qMin(w,extra->maxw);
h = qMin(h,extra->maxh);
@@ -228,17 +237,10 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
data.window_state = s;
}
- QPoint oldPos(q->pos());
- QSize oldSize(q->size());
- QRect oldGeom(data.crect);
-
bool isResize = w != oldSize.width() || h != oldSize.height();
if (!isMove && !isResize)
return;
- if (isResize)
- data.window_state &= ~Qt::WindowMaximized;
-
if (q->isWindow()) {
if (w == 0 || h == 0) {
q->setAttribute(Qt::WA_OutsideWSRange, true);