if (pRootWindow)
{
pEcoreEvas->RotateWindow(*pRootWindow, ::Convert(screenRotation));
- pRootWindow->SetRotation(::Convert(screenRotation));
+ //pRootWindow->SetRotation(::Convert(screenRotation));
}
#if !defined(WINDOW_BASE_ROTATE)
{
if (rotations)
{
- SetWindowPreferredRotation(ownee, -1);
SetWindowAvailabledRotation(ownee, rotations, count);
free(rotations);
}
}
- else
+
+ bool preferredRoation = pOwnerWindow->GetPreferredRotation();
+ if (preferredRoation == true)
{
int preferredRotation = ecore_evas_wm_rotation_preferred_rotation_get(pOwnerLayer->GetEcoreEvas());
SetWindowPreferredRotation(ownee, preferredRotation);
}
+ else
+ {
+ SetWindowPreferredRotation(ownee, -1);
+ }
#endif
SetLastResult(E_SUCCESS);
Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pLayer->GetEcoreEvas());
SysLog(NID_UI, "[Window Manager Rotation][Window : 0x%x] Set window preferred rotation(%d).", win, rotation);
ecore_evas_wm_rotation_preferred_rotation_set(pLayer->GetEcoreEvas(), rotation);
+
+ _Window* pWindow = const_cast<_Window*>(&window);
+ if (pWindow)
+ {
+ if (rotation == -1)
+ {
+ pWindow->SetPreferredRotation(false);
+ }
+ else
+ {
+ pWindow->SetPreferredRotation(true);
+ }
+ }
}
void
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
pEcoreEvas->RotateWindow(*this, __rotation);
}
+
+void
+_Window::SetPreferredRotation(bool enable)
+{
+ __preferredRotation = enable;
+}
+
+bool
+_Window::GetPreferredRotation(void) const
+{
+ return __preferredRotation;
+}
#endif
bool
, __orientationEnabled(false)
#else
, __rotation(0)
+ , __preferredRotation(false)
#endif
{
SetControlDelegate(*this);
virtual result OnDetachingFromMainTree(void);
#if defined(WINDOW_BASE_ROTATE)
void OnWindowStateChanged(void);
+ void SetPreferredRotation(bool enable);
+ bool GetPreferredRotation(void) const;
#else
void SetOrientationEnabled(bool enable);
bool IsOrientationEnabled(void);
bool __orientationEnabled;
#else
int __rotation;
+ bool __preferredRotation;
#endif
friend class _ControlManager;