aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaroslaw Jaryszew <jaroslaw.jaryszew@teleca.com>2010-12-16 12:16:00 +0100
committerDominik Kapusta <dominik.kapusta@teleca.com>2010-12-28 09:40:26 +0100
commit50f483f58552e9c5552934d588b77e52019a532c (patch)
treeaf466ec49ecb80488b76b6547756e5f219455dd4
parent480bb57d1b414fccd87e93f33db8bf875c477147 (diff)
Fixes: NB#208934 - Volume indicator does not return to landscape in video play
RevBy: Marcin, Dominik Details: Now when setting orientation angle through MSceneManager::setOrientationAngle, the MWindow orientation angle and _MEEGOTOUCH_ORIENTATION_ANGLE x property is also updated.
-rw-r--r--src/corelib/scene/mscenemanager.cpp20
-rw-r--r--src/corelib/scene/mscenemanager.h1
-rw-r--r--src/corelib/scene/mscenemanager_p.h1
3 files changed, 22 insertions, 0 deletions
diff --git a/src/corelib/scene/mscenemanager.cpp b/src/corelib/scene/mscenemanager.cpp
index abd7260c..9e3ba6b2 100644
--- a/src/corelib/scene/mscenemanager.cpp
+++ b/src/corelib/scene/mscenemanager.cpp
@@ -187,6 +187,7 @@ void MSceneManagerPrivate::createOrientationAnimation()
SLOT(_q_applySceneWindowTransitionsQueuedDueToOrientationAnimation()));
q->connect(orientationAnimation, SIGNAL(finished()), SLOT(_q_triggerAsyncPendingOrientationChange()));
q->connect(orientationAnimation, SIGNAL(finished()), SLOT(_q_updateOnDisplayVisibility()));
+ q->connect(orientationAnimation, SIGNAL(finished()), SLOT(_q_setOrientationAngleForWindow()));
}
void MSceneManagerPrivate::initRelocator()
@@ -971,6 +972,25 @@ void MSceneManagerPrivate::setOrientationAngleWithoutAnimation(M::OrientationAng
_q_emitOrientationChangeFinished();
_q_updateOnDisplayVisibility();
+ _q_setOrientationAngleForWindow();
+}
+
+//we need to update MWindow orienentation angle
+void MSceneManagerPrivate::_q_setOrientationAngleForWindow()
+{
+ Q_Q(MSceneManager);
+
+ foreach(QGraphicsView *view, q->scene()->views()) {
+ if(!view)
+ continue;
+ MWindow* win = qobject_cast<MWindow *>(view);
+ if(win && win->d_func()->angle !=angle) {
+ win->d_func()->angle = angle;
+#ifdef Q_WS_X11
+ win->d_func()->setX11OrientationAngleProperty(angle);
+#endif
+ }
+ }
}
bool MSceneManagerPrivate::isOnDisplay()
diff --git a/src/corelib/scene/mscenemanager.h b/src/corelib/scene/mscenemanager.h
index 1e87475b..16aa2e64 100644
--- a/src/corelib/scene/mscenemanager.h
+++ b/src/corelib/scene/mscenemanager.h
@@ -331,6 +331,7 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_undoSceneWindowDislocation(MSceneWindow *sceneWindow))
Q_PRIVATE_SLOT(d_func(), void _q_updateRootElementsPositions())
Q_PRIVATE_SLOT(d_func(), void _q_updateOnDisplayVisibility())
+ Q_PRIVATE_SLOT(d_func(), void _q_setOrientationAngleForWindow())
#ifdef Q_WS_X11
Q_PRIVATE_SLOT(d_func(), void _q_updateDecoratorButtonsProperty())
#endif
diff --git a/src/corelib/scene/mscenemanager_p.h b/src/corelib/scene/mscenemanager_p.h
index ad64eede..9a89507f 100644
--- a/src/corelib/scene/mscenemanager_p.h
+++ b/src/corelib/scene/mscenemanager_p.h
@@ -211,6 +211,7 @@ public:
void _q_applyPendingOrientationChange();
void _q_updateRootElementsPositions();
+ void _q_setOrientationAngleForWindow();
#ifdef Q_WS_X11
void _q_updateDecoratorButtonsProperty();