From daa3bc04db7f05714dc7c1d02418327c647de402 Mon Sep 17 00:00:00 2001 From: SeungwanWoo Date: Wed, 27 Mar 2013 02:46:21 +0900 Subject: [PATCH] Revert "fix window rotation to decide orientation timing" This reverts commit 1ef704381b7ee415436d9f71127d88d9df773728 --- src/ui/FUi_OrientationAgent.cpp | 128 +++++++--------------------------------- src/ui/FUi_OrientationAgent.h | 3 +- 2 files changed, 23 insertions(+), 108 deletions(-) mode change 100755 => 100644 src/ui/FUi_OrientationAgent.cpp mode change 100755 => 100644 src/ui/FUi_OrientationAgent.h diff --git a/src/ui/FUi_OrientationAgent.cpp b/src/ui/FUi_OrientationAgent.cpp old mode 100755 new mode 100644 index 16e6a34..c308301 --- a/src/ui/FUi_OrientationAgent.cpp +++ b/src/ui/FUi_OrientationAgent.cpp @@ -74,7 +74,6 @@ _OrientationAgent::_OrientationAgent(Control& publicControl) , __pPublicEvent(null) , __mode(ORIENTATION_PORTRAIT) , __status(ORIENTATION_STATUS_PORTRAIT) - , __tempStatus(ORIENTATION_STATUS_PORTRAIT) , __firePublicEvent(false) , __statusChanged(false) , __updateStatus(true) @@ -210,46 +209,6 @@ _OrientationAgent::Update(bool draw) } } } - else - { - switch (__mode) - { - case ORIENTATION_PORTRAIT: - { - __draw = draw; - __tempStatus = ORIENTATION_STATUS_PORTRAIT; - UpdateOrientation(true); - } - break; - case ORIENTATION_LANDSCAPE: - { - __draw = draw; - __tempStatus = ORIENTATION_STATUS_LANDSCAPE; - UpdateOrientation(true); - SysLog(NID_UI, "Window Manager Rotation"); - } - break; - case ORIENTATION_PORTRAIT_REVERSE: - { - __draw = draw; - __tempStatus = ORIENTATION_STATUS_PORTRAIT_REVERSE; - UpdateOrientation(true); - } - break; - case ORIENTATION_LANDSCAPE_REVERSE: - { - __draw = draw; - __tempStatus = ORIENTATION_STATUS_LANDSCAPE_REVERSE; - UpdateOrientation(true); - } - break; - default: - { - SysLog(NID_UI, "Window Manager Rotation Default"); - } - break; - } - } } else { @@ -394,7 +353,7 @@ _OrientationAgent::Update(bool draw) #if defined(WINDOW_BASE_ROTATE) void -_OrientationAgent::UpdateOrientation(bool force) +_OrientationAgent::UpdateOrientation(void) { _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); if (!pEcoreEvas) @@ -408,13 +367,7 @@ _OrientationAgent::UpdateOrientation(bool force) return; } - int rotation = 0; - - _Window* pWindow = pImpl->GetCore().GetRootWindow(); - if (pWindow) - { - rotation = pEcoreEvas->GetWindowRotation(*pWindow); - } + int rotation = pEcoreEvas->GetWindowRotation(*(pImpl->GetCore().GetRootWindow())); // Update evas objects. OrientationStatus status = ORIENTATION_STATUS_NONE; @@ -436,11 +389,6 @@ _OrientationAgent::UpdateOrientation(bool force) break; } - if (force) - { - status = __tempStatus; - } - if (__updateStatus == true) { __statusChanged = false; @@ -618,72 +566,40 @@ _OrientationAgent::SetRotation(const _Window& window, Orientation orientation) switch (orientation) { case ORIENTATION_PORTRAIT: + pEcoreEvas->SetWindowPreferredRotation(window, 0); + + if ((deviceOrientation == 0) || (windowRotation == 0)) { - pEcoreEvas->SetWindowPreferredRotation(window, 0); - - __tempStatus = ORIENTATION_STATUS_PORTRAIT; - UpdateOrientation(true); - - return; - - /* - if ((deviceOrientation == 0) || (windowRotation == 0)) - { - callback = false; - } - */ + callback = false; } + break; case ORIENTATION_LANDSCAPE: + pEcoreEvas->SetWindowPreferredRotation(window, 270); + + if ((deviceOrientation == 270) || (windowRotation == 270)) { - pEcoreEvas->SetWindowPreferredRotation(window, 270); - - __tempStatus = ORIENTATION_STATUS_LANDSCAPE; - UpdateOrientation(true); - - return; - - /* - if ((deviceOrientation == 270) || (windowRotation == 270)) - { - callback = false; - } - */ + callback = false; } + break; case ORIENTATION_PORTRAIT_REVERSE: - { - pEcoreEvas->SetWindowPreferredRotation(window, 180); + pEcoreEvas->SetWindowPreferredRotation(window, 180); - __tempStatus = ORIENTATION_STATUS_PORTRAIT_REVERSE; - UpdateOrientation(true); - - return; - - /* - if ((deviceOrientation == 180) || (windowRotation == 180)) - { - callback = false; - } - */ + if ((deviceOrientation == 180) || (windowRotation == 180)) + { + callback = false; } + break; case ORIENTATION_LANDSCAPE_REVERSE: + pEcoreEvas->SetWindowPreferredRotation(window, 90); + + if ((deviceOrientation == 90) || (windowRotation == 90)) { - pEcoreEvas->SetWindowPreferredRotation(window, 90); - - __tempStatus = ORIENTATION_STATUS_LANDSCAPE_REVERSE; - UpdateOrientation(true); - - return; - - /* - if ((deviceOrientation == 90) || (windowRotation == 90)) - { - callback = false; - } - */ + callback = false; } + break; case ORIENTATION_AUTOMATIC: { diff --git a/src/ui/FUi_OrientationAgent.h b/src/ui/FUi_OrientationAgent.h old mode 100755 new mode 100644 index 39b3263..e858eec --- a/src/ui/FUi_OrientationAgent.h +++ b/src/ui/FUi_OrientationAgent.h @@ -52,7 +52,7 @@ public: void Update(bool draw = false); #if defined(WINDOW_BASE_ROTATE) - void UpdateOrientation(bool force = false); + void UpdateOrientation(void); #endif void RequestOrientationEvent(void); @@ -74,7 +74,6 @@ private: _PublicOrientationEvent* __pPublicEvent; Orientation __mode; OrientationStatus __status; - OrientationStatus __tempStatus; bool __firePublicEvent; bool __statusChanged; bool __updateStatus; -- 2.7.4