Fix the Ownee Rotation
authorChoi Munseok <ms47.choi@samsung.com>
Fri, 12 Apr 2013 11:14:39 +0000 (20:14 +0900)
committerChoi Munseok <ms47.choi@samsung.com>
Fri, 12 Apr 2013 11:14:39 +0000 (20:14 +0900)
Change-Id: Ia566bf144bfbd231c59dc2b30a83990a24edaee6
Signed-off-by: Choi Munseok <ms47.choi@samsung.com>
src/ui/FUi_EcoreEvas.cpp

index 9141de2..7adde30 100644 (file)
@@ -59,6 +59,7 @@
 #include "FUi_ActiveWindowEvent.h"
 #include "FUi_ControlImplManager.h"
 #include "FUiCtrl_Popup.h"
+#include "FUiCtrl_ContextMenu.h"
 
 using namespace Tizen::Base;
 using namespace Tizen::Base::Runtime;
@@ -2242,6 +2243,29 @@ _EcoreEvas::SetWindowBounds(const _Window& window, const Rectangle& bounds)
        int rotate = ecore_evas_rotation_get(pEcoreEvas);
 
        _Window* pWindow = const_cast<_Window*>(&window);
+
+       _ContextMenu* pContextMenu = dynamic_cast<_ContextMenu*>(pWindow);
+       if (pContextMenu)
+       {
+               // [Exception]
+               // ContextMenu
+               // Skip
+               
+               _ControlManager* pControlManager = _ControlManager::GetInstance();
+               if (pControlManager)
+               {
+                       _Window* pCurFrame = pControlManager->GetCurrentFrame();
+                       if (pCurFrame)
+                       {
+                               int ownerRotate = GetWindowRotation(*pCurFrame);
+                               if (ownerRotate != rotate)
+                               {
+                                       return;
+                               }
+                       }
+               }
+       }
+
        if (pWindow->IsLayoutChangable() == true)
        {
                _Popup* pPopup = dynamic_cast<_Popup*>(pWindow);
@@ -2337,6 +2361,29 @@ _EcoreEvas::SetWindowBounds(const _Window& window, const FloatRectangle& bounds)
        int rotate = ecore_evas_rotation_get(pEcoreEvas);
 
        _Window* pWindow = const_cast<_Window*>(&window);
+
+       _ContextMenu* pContextMenu = dynamic_cast<_ContextMenu*>(pWindow);
+       if (pContextMenu)
+       {
+               // [Exception]
+               // ContextMenu
+               // Skip
+
+               _ControlManager* pControlManager = _ControlManager::GetInstance();
+               if (pControlManager)
+               {
+                       _Window* pCurFrame = pControlManager->GetCurrentFrame();
+                       if (pCurFrame)
+                       {
+                               int ownerRotate = GetWindowRotation(*pCurFrame);
+                               if (ownerRotate != rotate)
+                               {
+                                       return;
+                               }
+                       }
+               }
+       }
+
        if (pWindow->IsLayoutChangable() == true)
        {
                _Popup* pPopup = dynamic_cast<_Popup*>(pWindow);