summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-05-04 07:35:41 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-05-04 07:35:41 (GMT)
commit5d720a3ff97eef934c8bf61805da4df500f8afa5 (patch)
tree619700b27cedb4eb4a362ba9fa1a4ccce224b82c
parent184a86f81711212fea21a827701eb4e95c37010b (diff)
parent97e423b50d316c3a9e2083c3a9d80bf16554faa9 (diff)
downloadQt-5d720a3ff97eef934c8bf61805da4df500f8afa5.zip
Qt-5d720a3ff97eef934c8bf61805da4df500f8afa5.tar.gz
Qt-5d720a3ff97eef934c8bf61805da4df500f8afa5.tar.bz2
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-symbian-team
* 'master' of git://scm.dev.nokia.troll.no/qt/qt-symbian-team: Do not allow fullscreen/maximized windows to expand beyond client rect
-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 12bcc4b..5e9584b 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -235,19 +235,21 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
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;
-
bool checkExtra = true;
- if (q->isWindow() && (data.window_state & Qt::WindowFullScreen)) {
- // Do not modity window size for fullscreen windows, if requested
- // size is already equal to clientRect.
+ if (q->isWindow() && (data.window_state & (Qt::WindowFullScreen | Qt::WindowMaximized))) {
+ // Do not allow fullscreen/maximized windows to expand beyond client rect
TRect r = static_cast<CEikAppUi*>(S60->appUi())->ClientRect();
+ w = qMin(w, r.Width());
+ h = qMin(h, r.Height());
+
if (w == r.Width() && h == r.Height())
checkExtra = false;
}
+ // Lose maximized status if deliberate resize
+ if (w != oldSize.width() || h != oldSize.height())
+ data.window_state &= ~Qt::WindowMaximized;
+
if (checkExtra && extra) { // any size restrictions?
w = qMin(w,extra->maxw);
h = qMin(h,extra->maxh);