summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_s60.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@nokia.com>2011-08-31 13:15:17 +0200
committerLiang Qi <liang.qi@nokia.com>2011-08-31 13:15:17 +0200
commit5e980fb9a4504e1613186c92c67c89a8cce4b4c4 (patch)
tree7e9f3b522d38ae95c6e28d9834a070aa28af8609 /src/gui/kernel/qwidget_s60.cpp
parent54d69ef97327e735cdeca1f1a808ba09a781cf08 (diff)
parent5a9000c3aca05e28c4fc537f82d85d6ec4395dc5 (diff)
Merge branch 'qt-4.7' into 4.7
Conflicts: src/gui/inputmethod/qcoefepinputcontext_s60.cpp
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 3c2d63c509..e80ecedc16 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -233,11 +233,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);