Fix the Rotation
authorChoi Munseok <ms47.choi@samsung.com>
Thu, 23 May 2013 02:40:15 +0000 (11:40 +0900)
committerChoi Munseok <ms47.choi@samsung.com>
Thu, 23 May 2013 02:40:15 +0000 (11:40 +0900)
Change-Id: I44ac0b6de5311d4feab106d7f8bbe88d873408b5
Signed-off-by: Choi Munseok <ms47.choi@samsung.com>
src/ui/FUi_EcoreEvas.cpp
src/ui/FUi_OrientationAgent.cpp
src/ui/FUi_Window.cpp
src/ui/inc/FUi_EcoreEvas.h

index 4cfc4de..b27efae 100644 (file)
@@ -1219,8 +1219,11 @@ _EcoreEvas::~_EcoreEvas(void)
 }
 
 void
-_EcoreEvas::RotateWindow(const _Window& window, int orientation)
+_EcoreEvas::RotateWindow(const _Window& window, int orientation, bool rotateEvas)
 {
+       // Set window bounds according to the rotation
+       // Rotate Evas
+
        _EflLayer* pLayer = GetEflLayer(window);
        if (!pLayer)
        {
@@ -1264,7 +1267,10 @@ _EcoreEvas::RotateWindow(const _Window& window, int orientation)
 
        if (rotatePartial == false)
        {
-               ecore_evas_rotation_with_resize_set(pEcoreEvas, orientation);
+               if (rotateEvas == true)
+               {
+                       ecore_evas_rotation_with_resize_set(pEcoreEvas, orientation);
+               }
 
                evas_object_move(pWinObj, 0, 0);
 
@@ -1281,7 +1287,10 @@ _EcoreEvas::RotateWindow(const _Window& window, int orientation)
        }
        else
        {
-               ecore_evas_rotation_set(pEcoreEvas, orientation);
+               if (rotateEvas == true)
+               {
+                       ecore_evas_rotation_set(pEcoreEvas, orientation);
+               }
 
                Rectangle winBounds = _CoordinateSystemUtils::Transform(window.GetBounds());
                int rotate = ecore_evas_rotation_get(pEcoreEvas);
@@ -2269,7 +2278,6 @@ _EcoreEvas::SetWindowBounds(const _Window& window, const Rectangle& bounds)
                }
        }
 
-
        int winX = winBounds.x;
        int winY = winBounds.y;
 
@@ -2362,7 +2370,6 @@ _EcoreEvas::SetWindowBounds(const _Window& window, const FloatRectangle& bounds)
                }
        }
 
-
        int winX = winBounds.x;
        int winY = winBounds.y;
 
index d64dd0b..c441d4e 100644 (file)
@@ -446,7 +446,7 @@ _OrientationAgent::UpdateOrientation(void)
                }
        }
 
-       pEcoreEvas->RotateWindow(*pRootWindow, rotation);
+       pEcoreEvas->RotateWindow(*pRootWindow, rotation, false);
 
        if (__statusChanged == true)
        {
index 26a0496..ad8dd5e 100644 (file)
@@ -622,7 +622,7 @@ _Window::OnWindowStateChanged(void)
        _ControlOrientation controlOrientation = (rotation == 0 || rotation == 180) ? _CONTROL_ORIENTATION_PORTRAIT : _CONTROL_ORIENTATION_LANDSCAPE;
        ChangeLayout(controlOrientation);
 
-       pEcoreEvas->RotateWindow(*this, __rotation);
+       pEcoreEvas->RotateWindow(*this, __rotation, false);
 
        Invalidate(true);
 
index 9fcc6dc..bdbe44e 100644 (file)
@@ -108,7 +108,7 @@ public:
        void ActivateWindow(const _Window& window);
        void MinimizeWindow(_Window& window);
 
-       void RotateWindow(const _Window& window, int orientation);
+       void RotateWindow(const _Window& window, int orientation, bool rotateEvas = true);
        int GetWindowRotation(const _Window& window);
 #if defined(WINDOW_BASE_ROTATE)
        void SetWindowPreferredRotation(const _Window& window, int rotation);