summaryrefslogtreecommitdiffstats
path: root/tools/qml/qmlruntime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qml/qmlruntime.cpp')
-rw-r--r--tools/qml/qmlruntime.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp
index 321b7fdec6..b38e80dc6c 100644
--- a/tools/qml/qmlruntime.cpp
+++ b/tools/qml/qmlruntime.cpp
@@ -1208,8 +1208,10 @@ bool QDeclarativeViewer::event(QEvent *event)
{
if (event->type() == QEvent::WindowActivate) {
Runtime::instance()->setActiveWindow(true);
+ DeviceOrientation::instance()->resumeListening();
} else if (event->type() == QEvent::WindowDeactivate) {
Runtime::instance()->setActiveWindow(false);
+ DeviceOrientation::instance()->pauseListening();
}
return QWidget::event(event);
}