diff options
author | Jason Barron <jbarron@trolltech.com> | 2010-04-20 07:35:27 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2010-04-21 07:40:57 (GMT) |
commit | 713910ac67da8ba4b96fc6fb0e350676fbd730d3 (patch) | |
tree | d1f9843190c5b7f413a340242b0864249a42249e /src/gui | |
parent | e4c54b84057e55b475cc03cbfcc289e63b01e35f (diff) | |
download | Qt-713910ac67da8ba4b96fc6fb0e350676fbd730d3.zip Qt-713910ac67da8ba4b96fc6fb0e350676fbd730d3.tar.gz Qt-713910ac67da8ba4b96fc6fb0e350676fbd730d3.tar.bz2 |
Don't use setGeometry() in setWindowState() on Symbian.
setGeometry() has the side effect that it internally sets both the
WA_Moved and WA_Resized attributes and these attributes should only be
used when the application has explicitly set a size or position. When
a widget is resized due to being maximized or fullscreened then we
should resize the native window handle instead of calling setGeometry.
Reviewed-by: Janne Anttila
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 690fb8d..b6a6359 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -1112,12 +1112,14 @@ void QWidget::setWindowState(Qt::WindowStates newstate) const bool cbaVisibilityHint = windowFlags() & Qt::WindowSoftkeysVisibleHint; - if (newstate & Qt::WindowFullScreen && !cbaVisibilityHint) - setGeometry(qApp->desktop()->screenGeometry(this)); - else if (newstate & Qt::WindowMaximized || ((newstate & Qt::WindowFullScreen) && cbaVisibilityHint)) - setGeometry(qApp->desktop()->availableGeometry(this)); - else + if (newstate & Qt::WindowFullScreen && !cbaVisibilityHint) { + window->SetExtentToWholeScreen(); + } else if (newstate & Qt::WindowMaximized || ((newstate & Qt::WindowFullScreen) && cbaVisibilityHint)) { + TRect maxExtent = qt_QRect2TRect(qApp->desktop()->availableGeometry(this)); + window->SetExtent(maxExtent.iTl, maxExtent.Size()); + } else { setGeometry(normalGeometry); + } //restore normal geometry top->normalGeometry = normalGeometry; |