Set window state flag
authorkeonpyo.kong <keonpyo.kong@samsung.com>
Fri, 31 May 2013 07:55:20 +0000 (16:55 +0900)
committerkeonpyo.kong <keonpyo.kong@samsung.com>
Fri, 31 May 2013 07:55:35 +0000 (16:55 +0900)
Change-Id: Iae39e8a133efbe580c764f3271eb83bb5a642880
Signed-off-by: keonpyo.kong <keonpyo.kong@samsung.com>
src/ui/FUi_ControlImplManager.cpp
src/ui/FUi_Window.cpp

index f6cbe2f..493b3df 100644 (file)
@@ -344,6 +344,7 @@ OrientationStatus
 _ControlImplManager::GetFormOrientationStatus(const _ControlImpl* pControlImpl) const
 {
        const _FormImpl* pFormImpl = null;
+       const _ControlImpl* pOriControlImpl = pControlImpl;
        OrientationStatus orientation = ORIENTATION_STATUS_NONE;
        
        while(pControlImpl)
@@ -365,6 +366,32 @@ _ControlImplManager::GetFormOrientationStatus(const _ControlImpl* pControlImpl)
                orientation = pFormImpl->GetOrientationStatus();
        }
 
+       if (orientation == ORIENTATION_STATUS_NONE)
+       {
+               _Form* pForm = null;
+               _Control* pControl = const_cast<_Control*>(&(pOriControlImpl->GetCore()));
+               while(pControl)
+               {
+                       pForm = dynamic_cast<_Form*>(pControl);
+
+                       if (pForm != null)
+                       {
+                               break;
+                       }
+                       else
+                       {
+                               pControl = pControl->GetParent();
+                       }
+               }
+
+               if (pForm)
+               {
+                       _FormImpl* pFormImpl = static_cast<_FormImpl*>(pForm->GetUserData());
+                       orientation = pFormImpl->GetOrientationStatus();
+               }
+
+       }
+
        return orientation;
 }
 
index 6c0042a..8257763 100644 (file)
@@ -554,6 +554,7 @@ _Window::OnWindowStateChanged(void)
        // Change layout
        // Rotate window
 
+       SetOrientationCallbackModeEnabled(true);
        _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
        if (!pEcoreEvas)
        {
@@ -618,6 +619,7 @@ _Window::OnWindowStateChanged(void)
        Invalidate(true);
 
        SysLog(NID_UI, "[Window Manager Rotation] ---------- Update Ownee Window : END ----------");
+       SetOrientationCallbackModeEnabled(false);
 }
 
 void