summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_s60.cpp
diff options
context:
space:
mode:
authorSamuel Nevala <samuel.nevala@digia.com>2010-02-05 07:51:00 (GMT)
committerJani Hautakangas <ext-jani.hautakangas@nokia.com>2010-02-05 10:48:37 (GMT)
commit79fb890a4f2a13cc0f21e92f5b2a6e10af1430b4 (patch)
tree33fde1ea405828b9462f3735c375913eecd7a158 /src/gui/kernel/qapplication_s60.cpp
parentbd36d753337090a2878fc0ca4117e2250c5ae1b7 (diff)
downloadQt-79fb890a4f2a13cc0f21e92f5b2a6e10af1430b4.zip
Qt-79fb890a4f2a13cc0f21e92f5b2a6e10af1430b4.tar.gz
Qt-79fb890a4f2a13cc0f21e92f5b2a6e10af1430b4.tar.bz2
s60 application loses normalGeometry when returning from fullscreen
Problem description: normalGeomerty lost during showFullScreen 1. Reported problen was due on void QSymbianControl::PositionChanged() over write top->normaGeometry on every position change. As fix top->normalGeometry is moved to new rect:s top left only when widget windowState == 0. 2. Also made some new qwidget auto tests. Refactored s60 side setWindowState to be more readable. Minimized window state now hides window decoration. QApplication & QWidget autotest run on emulator and tested on s60 5.0 hw using attached application. http://bugreports.qt.nokia.com/browse/QTBUG-6231 Task-number:QTBUG-6231 Merge-request: 2256 Reviewed-by: Jani Hautakangas <ext-jani.hautakangas@nokia.com>
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 6e03d7c..4a137ee 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -924,8 +924,8 @@ void QSymbianControl::PositionChanged()
cr.moveTopLeft(newPos);
qwidget->data->crect = cr;
QTLWExtra *top = qwidget->d_func()->maybeTopData();
- if (top)
- top->normalGeometry = cr;
+ if (top && (qwidget->windowState() & (~Qt::WindowActive)) == Qt::WindowNoState)
+ top->normalGeometry.moveTopLeft(newPos);
if (qwidget->isVisible()) {
QMoveEvent e(newPos, oldPos);
qt_sendSpontaneousEvent(qwidget, &e);
@@ -960,15 +960,14 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */)
qwidget->d_func()->setWindowIcon_sys(true);
qwidget->d_func()->setWindowTitle_sys(qwidget->windowTitle());
#ifdef Q_WS_S60
- // If widget is fullscreen, hide status pane and button container
- // otherwise show them.
+ // If widget is fullscreen/minimized, hide status pane and button container otherwise show them.
CEikStatusPane* statusPane = S60->statusPane();
CEikButtonGroupContainer* buttonGroup = S60->buttonGroupContainer();
- bool isFullscreen = qwidget->windowState() & Qt::WindowFullScreen;
- if (statusPane && (bool)statusPane->IsVisible() == isFullscreen)
- statusPane->MakeVisible(!isFullscreen);
- if (buttonGroup && (bool)buttonGroup->IsVisible() == isFullscreen)
- buttonGroup->MakeVisible(!isFullscreen);
+ TBool visible = !(qwidget->windowState() & (Qt::WindowFullScreen | Qt::WindowMinimized));
+ if (statusPane)
+ statusPane->MakeVisible(visible);
+ if (buttonGroup)
+ buttonGroup->MakeVisible(visible);
#endif
} else if (QApplication::activeWindow() == qwidget->window()) {
if (CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog()) {