diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2011-04-18 12:40:26 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2011-08-11 08:28:00 (GMT) |
commit | d4a2ce8ad5be6633f0e5c5a74eaa8b9c32c02ba8 (patch) | |
tree | 92f290713a2e8d1e0539dca94c4beac48a6c8968 | |
parent | 6a3b5c13ac40c18951efd8be1e3506606da0f6f9 (diff) | |
download | Qt-d4a2ce8ad5be6633f0e5c5a74eaa8b9c32c02ba8.zip Qt-d4a2ce8ad5be6633f0e5c5a74eaa8b9c32c02ba8.tar.gz Qt-d4a2ce8ad5be6633f0e5c5a74eaa8b9c32c02ba8.tar.bz2 |
Do not modify window size for fullscreen windows in setGeometry_sys
Minimum sizes of widgets can cause windows to expand beyond screen
limits in QWidgetPrivate::setGeometry_sys. Normally this is not
noticeable as the window size is forced in various places to the
clientRect, but there are certain sequences where the size set in
setGeometry_sys is the final one, resulting in too large windows.
Removed the modification of window size in setGeometry_sys
for fullscreen windows for which the correct size is already requested.
Task-number: QTBUG-18749
Reviewed-by: Sami Merila
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 5630706..ada85ce 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -239,7 +239,16 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove) if (w != oldSize.width() || h != oldSize.height()) data.window_state &= ~Qt::WindowMaximized; - if (extra) { // any size restrictions? + 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. + TRect r = static_cast<CEikAppUi*>(S60->appUi())->ClientRect(); + if (w == r.Width() && h == r.Height()) + checkExtra = false; + } + + if (checkExtra && extra) { // any size restrictions? w = qMin(w,extra->maxw); h = qMin(h,extra->maxh); w = qMax(w,extra->minw); |