diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-05-16 08:02:12 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-05-16 08:08:59 (GMT) |
commit | 3773fcb78db02a2577c89f755c07c2c7dbf0de74 (patch) | |
tree | 95115e9ccebc81ae8fdb6dfa9f8305ff9feff462 /src/gui/kernel/qwidget_s60.cpp | |
parent | 9f1bf75b1d55af2dda000cba580fafed2aa83838 (diff) | |
parent | 7e4a9187bb11b794e45d95d2e9fae026d6b0d07d (diff) | |
download | Qt-3773fcb78db02a2577c89f755c07c2c7dbf0de74.zip Qt-3773fcb78db02a2577c89f755c07c2c7dbf0de74.tar.gz Qt-3773fcb78db02a2577c89f755c07c2c7dbf0de74.tar.bz2 |
Merge remote-tracking branch 'origin/4.8' into qt-4.8-from-4.7
Conflicts:
src/gui/kernel/qt_s60_p.h
Diffstat (limited to 'src/gui/kernel/qwidget_s60.cpp')
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 5ab3d00..c011cf1 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); |