summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2011-04-06 14:20:33 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2011-04-07 10:09:05 (GMT)
commitc2383fa6a8070bf5bec4a444ae7d486874f35ab2 (patch)
tree36638f8db49d50b408439f07058fe973112278ba /src
parenta12d41076919a133e63de63dff5c1a131a0564e4 (diff)
downloadQt-c2383fa6a8070bf5bec4a444ae7d486874f35ab2.zip
Qt-c2383fa6a8070bf5bec4a444ae7d486874f35ab2.tar.gz
Qt-c2383fa6a8070bf5bec4a444ae7d486874f35ab2.tar.bz2
Do not unnecessarily draw application twice in landscape
Fullscreen with softkeys dialogs would draw twice when orientation was changed to landscape, causing flicker. This happened because status pane change event and layout change event both caused redraw with different client area size. Added a check to avoid handling client area change on account of status pane change, if status pane is not visible and there was no change in its visibility. Task-number: QTBUG-18496 Reviewed-by: Sami Merila
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp9
-rw-r--r--src/gui/kernel/qt_s60_p.h1
2 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 21b50b6..a8680b9 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -459,6 +459,7 @@ QSymbianControl::QSymbianControl(QWidget *w)
, m_ignoreFocusChanged(0)
, m_symbianPopupIsOpen(0)
, m_inExternalScreenOverride(false)
+ , m_lastStatusPaneVisibility(0)
{
}
@@ -1427,7 +1428,13 @@ void QSymbianControl::HandleResourceChange(int resourceType)
}
break;
case KInternalStatusPaneChange:
- handleClientAreaChange();
+ // When status pane is not visible, only handle client area change if status pane was
+ // previously visible, as size changes to hidden status pane should not affect
+ // client area.
+ if (S60->statusPane() && (S60->statusPane()->IsVisible() || m_lastStatusPaneVisibility)) {
+ m_lastStatusPaneVisibility = S60->statusPane()->IsVisible();
+ handleClientAreaChange();
+ }
if (IsFocused() && IsVisible()) {
qwidget->d_func()->setWindowIcon_sys(true);
qwidget->d_func()->setWindowTitle_sys(qwidget->windowTitle());
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
index ee0b862..c48bf63 100644
--- a/src/gui/kernel/qt_s60_p.h
+++ b/src/gui/kernel/qt_s60_p.h
@@ -295,6 +295,7 @@ private:
#endif
bool m_inExternalScreenOverride : 1;
+ bool m_lastStatusPaneVisibility : 1;
};
inline QS60Data::QS60Data()