diff options
author | Liang Qi <liang.qi@nokia.com> | 2011-08-31 13:15:17 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@nokia.com> | 2011-08-31 13:15:17 +0200 |
commit | 5e980fb9a4504e1613186c92c67c89a8cce4b4c4 (patch) | |
tree | 7e9f3b522d38ae95c6e28d9834a070aa28af8609 /src/gui/kernel/qwidget_s60.cpp | |
parent | 54d69ef97327e735cdeca1f1a808ba09a781cf08 (diff) | |
parent | 5a9000c3aca05e28c4fc537f82d85d6ec4395dc5 (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.cpp | 13 |
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); |