summaryrefslogtreecommitdiffstats
path: root/src/plugins/graphicssystems
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-05-13 14:41:57 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2011-05-16 08:17:35 (GMT)
commit8e4fecb730fda4dac801b4f8e618ecae8103c00c (patch)
tree03a0295fc37a098b287d4e9663909e1d51a5a8d8 /src/plugins/graphicssystems
parentb7b9a22ce263fcb430ff4228fb88ca5229a6e226 (diff)
downloadQt-8e4fecb730fda4dac801b4f8e618ecae8103c00c.zip
Qt-8e4fecb730fda4dac801b4f8e618ecae8103c00c.tar.gz
Qt-8e4fecb730fda4dac801b4f8e618ecae8103c00c.tar.bz2
Fixed bug in meego graphics system runtime switching.
Switch when the last _visible_ widget is destroyed (and also switch back when a widget is mapped and there are no other visible widgets). Reviewed-by: Armin Berres
Diffstat (limited to 'src/plugins/graphicssystems')
-rw-r--r--src/plugins/graphicssystems/meego/qmeegographicssystem.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
index 69a6922..412d521 100644
--- a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
+++ b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
@@ -124,14 +124,14 @@ void QMeeGoGraphicsSystemSwitchHandler::addWidget(QWidget *widget)
void QMeeGoGraphicsSystemSwitchHandler::handleMapNotify()
{
- if (m_widgets.isEmpty() && QMeeGoGraphicsSystem::switchPolicy == QMeeGoGraphicsSystem::AutomaticSwitch)
+ if (QMeeGoGraphicsSystem::switchPolicy == QMeeGoGraphicsSystem::AutomaticSwitch && visibleWidgets() == 0)
QTimer::singleShot(0, this, SLOT(switchToMeeGo()));
}
void QMeeGoGraphicsSystemSwitchHandler::removeWidget(QObject *object)
{
m_widgets.removeOne(static_cast<QWidget *>(object));
- if (m_widgets.isEmpty() && QMeeGoGraphicsSystem::switchPolicy == QMeeGoGraphicsSystem::AutomaticSwitch)
+ if (QMeeGoGraphicsSystem::switchPolicy == QMeeGoGraphicsSystem::AutomaticSwitch && visibleWidgets() == 0)
QTimer::singleShot(0, this, SLOT(switchToRaster()));
}