Fix the Rotation
authorChoi Munseok <ms47.choi@samsung.com>
Wed, 22 May 2013 05:11:01 +0000 (14:11 +0900)
committerChoi Munseok <ms47.choi@samsung.com>
Wed, 22 May 2013 05:11:01 +0000 (14:11 +0900)
Change-Id: Ibe5c30cc30683f5a0ec24a0ba422e5ade0a5efbb
Signed-off-by: Choi Munseok <ms47.choi@samsung.com>
src/ui/FUi_OrientationAgent.cpp
src/ui/FUi_OrientationAgent.h

index 6ad9c56..d64dd0b 100644 (file)
@@ -428,7 +428,7 @@ _OrientationAgent::UpdateOrientation(void)
        __status = status;
 
        pEcoreEvas->AllowSetWindowBounds(false);
-       FireEvent(status);
+       FireEvent(status, true);
        pEcoreEvas->AllowSetWindowBounds(true);
 
        // For the form to be made by Ui-Builder
@@ -514,7 +514,7 @@ _OrientationAgent::FireOrientationEvent(void)
 }
 
 void
-_OrientationAgent::FireEvent(OrientationStatus status)
+_OrientationAgent::FireEvent(OrientationStatus status, bool callback)
 {
        ClearLastResult();
 
@@ -568,7 +568,11 @@ _OrientationAgent::FireEvent(OrientationStatus status)
                _Window* pOwnee = pImpl->GetCore().GetOwnee(i);
                if (pOwnee)
                {
-                       pOwnee->ChangeLayout(coreOrientation); // Need to test
+                       if (!((callback == true) && (pOwnee->IsRotationSynchronized() == true)))
+                       {
+                               pOwnee->ChangeLayout(coreOrientation);
+                       }
+
                        pEcoreEvas->SetOwner(*pOwnee, pImpl->GetCore());
                }
        }
@@ -582,7 +586,11 @@ _OrientationAgent::FireEvent(OrientationStatus status)
                        _Window* pOwnee = pParent->GetOwnee(i);
                        if (pOwnee)
                        {
-                               pOwnee->ChangeLayout(coreOrientation); // Need to test
+                               if (!((callback == true) && (pOwnee->IsRotationSynchronized() == true)))
+                               {
+                                       pOwnee->ChangeLayout(coreOrientation);
+                               }
+
                                pEcoreEvas->SetOwner(*pOwnee, *pParent);
                        }
                }
index e946b6e..b89f0f5 100644 (file)
@@ -60,7 +60,7 @@ public:
        void FireOrientationEvent(void);
 
 private:
-       void FireEvent(OrientationStatus status);
+       void FireEvent(OrientationStatus status, bool callback = false);
 
        _OrientationAgent(Control& publicControl);