Revert "Adjust the position of the partial Frame"
[platform/framework/native/uifw.git] / src / ui / FUi_OrientationAgent.cpp
old mode 100644 (file)
new mode 100755 (executable)
index 04d493d..9a245e1
@@ -187,6 +187,7 @@ _OrientationAgent::Update(bool draw)
                // Set preffered rotation
 
                OrientationStatus status = pImplManager->GetOrientationStatus(__mode);
+               SysLog(NID_UI, "[Window Manager Rotation] Update : __mode(%d) -> status(%d)", __mode, status);
                
                if (__updateStatus == true)
                {
@@ -483,16 +484,6 @@ _OrientationAgent::FireOrientationEvent(void)
                IEventArg* pArg = _PublicOrientationEvent::CreateOrientationEventArgN(*__pPublicEvent->GetSource(), __status);
                __pPublicEvent->Fire(*pArg);
 
-               _ControlImpl* pImpl = _ControlImpl::GetInstance(__publicControl);
-               if (pImpl)
-               {
-                       _Window* pWindow = pImpl->GetCore().GetRootWindow();
-                       if (pWindow)
-                       {
-                               SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Fire the public orientation event..", pWindow->GetNativeHandle());
-                       }
-               }
-
                __updateStatus = true;
        }
 }
@@ -590,6 +581,41 @@ _OrientationAgent::SetRotation(const _Window& window, Orientation orientation)
        default:
                break;
        }
+
+       // [Ownee]
+       // 1. ActivateWindow
+       // 2. SetOwner
+       // 3. SetRotation
+
+       _ControlImpl* pImpl = _ControlImpl::GetInstance(__publicControl);
+       if (!pImpl)
+       {
+               return;
+       }
+
+       int owneeCount = pImpl->GetCore().GetOwneeCount();
+       for (int i = 0; i < owneeCount; i++)
+       {
+               _Window* pOwnee = pImpl->GetCore().GetOwnee(i);
+               if (pOwnee)
+               {
+                       pEcoreEvas->SetOwner(*pOwnee, pImpl->GetCore());
+               }
+       }
+
+       _Control* pParent = pImpl->GetCore().GetParent();
+       if (pParent)
+       {
+               int owneeCount = pParent->GetOwneeCount();
+               for (int i = 0; i < owneeCount; i++)
+               {
+                       _Window* pOwnee = pParent->GetOwnee(i);
+                       if (pOwnee)
+                       {
+                               pEcoreEvas->SetOwner(*pOwnee, *pParent);
+                       }
+               }
+       }
 }
 #endif