summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_s60.cpp
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@nokia.com>2011-08-31 09:38:52 +0200
committerSergio Ahumada <sergio.ahumada@nokia.com>2011-08-31 09:39:36 +0200
commit0e10b8dbb7d84694cbdeb57bf42df52b12d79f47 (patch)
treee0968185c3afce109537977c9eb0df4cfd8f6cb7 /src/gui/kernel/qwidget_s60.cpp
parentac51ebee5bcc975829cf59012dfe9bb198016ed1 (diff)
parent5a9000c3aca05e28c4fc537f82d85d6ec4395dc5 (diff)
Merge branch 4.7 into qt-4.8-from-4.7
Conflicts: doc/src/index.qdoc
Diffstat (limited to 'src/gui/kernel/qwidget_s60.cpp')
-rw-r--r--src/gui/kernel/qwidget_s60.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 256e34b02a..807f68e1b1 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -235,11 +235,22 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
QSize oldSize(q->size());
QRect oldGeom(data.crect);
+ bool checkExtra = true;
+ if (q->isWindow() && (data.window_state & (Qt::WindowFullScreen | Qt::WindowMaximized))) {
+ // Do not allow fullscreen/maximized windows to expand beyond client rect
+ TRect r = S60->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 (extra) { // any size restrictions?
+ if (checkExtra && extra) { // any size restrictions?
w = qMin(w,extra->maxw);
h = qMin(h,extra->maxh);
w = qMax(w,extra->minw);