summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_s60.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-08-02 02:56:07 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-08-02 02:56:07 (GMT)
commit666a475ea8c32eb5c49a53b29defc2c66c9cc5e3 (patch)
treedfb4fe2d4308f02bf3b8d45331b5d93c1cabae01 /src/gui/kernel/qwidget_s60.cpp
parentd39d01497640c3a0818d25036894495f8b597bdb (diff)
parente93d11c733bb44208089a7488c6e7a176468d407 (diff)
downloadQt-666a475ea8c32eb5c49a53b29defc2c66c9cc5e3.zip
Qt-666a475ea8c32eb5c49a53b29defc2c66c9cc5e3.tar.gz
Qt-666a475ea8c32eb5c49a53b29defc2c66c9cc5e3.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src/gui/kernel/qwidget_s60.cpp')
-rw-r--r--src/gui/kernel/qwidget_s60.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 2818d88..56349ad 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -1113,15 +1113,10 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
// The window decoration visibility has to be changed before doing actual window state
// change since in that order the availableGeometry will return directly the right size and
// we will avoid unnecessarty redraws
- CEikStatusPane *statusPane = S60->statusPane();
- CEikButtonGroupContainer *buttonGroup = S60->buttonGroupContainer();
- TBool visible = !(newstate & (Qt::WindowFullScreen | Qt::WindowMinimized));
- if (statusPane)
- statusPane->MakeVisible(visible);
- if (buttonGroup) {
- // Visibility
- buttonGroup->MakeVisible(visible || (isFullscreen && cbaRequested));
- }
+ const bool visible = !(newstate & (Qt::WindowFullScreen | Qt::WindowMinimized));
+ const bool statusPaneVisibility = visible;
+ const bool buttonGroupVisibility = (visible || (isFullscreen && cbaRequested));
+ S60->setStatusPaneAndButtonGroupVisibility(statusPaneVisibility, buttonGroupVisibility);
#endif // Q_WS_S60
// Ensure the initial size is valid, since we store it as normalGeometry below.
@@ -1133,8 +1128,10 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
const bool cbaVisibilityHint = windowFlags() & Qt::WindowSoftkeysVisibleHint;
if (newstate & Qt::WindowFullScreen && !cbaVisibilityHint) {
+ setAttribute(Qt::WA_OutsideWSRange, false);
window->SetExtentToWholeScreen();
} else if (newstate & Qt::WindowMaximized || ((newstate & Qt::WindowFullScreen) && cbaVisibilityHint)) {
+ setAttribute(Qt::WA_OutsideWSRange, false);
TRect maxExtent = qt_QRect2TRect(qApp->desktop()->availableGeometry(this));
window->SetExtent(maxExtent.iTl, maxExtent.Size());
} else {
@@ -1143,7 +1140,7 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
// accurate because it did not consider the status pane. This means that when returning
// normal mode after showing the status pane, the geometry would overlap so we should
// move it if it never had an explicit position.
- if (!wasMoved && statusPane && visible) {
+ if (!wasMoved && S60->statusPane() && visible) {
TPoint tl = static_cast<CEikAppUi*>(S60->appUi())->ClientRect().iTl;
normalGeometry.setTopLeft(QPoint(tl.iX, tl.iY));
}