, __pPublicEvent(null)
, __mode(ORIENTATION_PORTRAIT)
, __status(ORIENTATION_STATUS_PORTRAIT)
+ , __tempStatus(ORIENTATION_STATUS_PORTRAIT)
, __firePublicEvent(false)
, __statusChanged(false)
, __updateStatus(true)
}
}
}
+ else
+ {
+ switch (__mode)
+ {
+ case ORIENTATION_PORTRAIT:
+ {
+ __draw = draw;
+ __tempStatus = ORIENTATION_STATUS_PORTRAIT;
+ UpdateOrientation(true);
+ }
+ break;
+ case ORIENTATION_LANDSCAPE:
+ {
+ __draw = draw;
+ __tempStatus = ORIENTATION_STATUS_LANDSCAPE;
+ UpdateOrientation(true);
+ SysLog(NID_UI, "Window Manager Rotation");
+ }
+ break;
+ case ORIENTATION_PORTRAIT_REVERSE:
+ {
+ __draw = draw;
+ __tempStatus = ORIENTATION_STATUS_PORTRAIT_REVERSE;
+ UpdateOrientation(true);
+ }
+ break;
+ case ORIENTATION_LANDSCAPE_REVERSE:
+ {
+ __draw = draw;
+ __tempStatus = ORIENTATION_STATUS_LANDSCAPE_REVERSE;
+ UpdateOrientation(true);
+ }
+ break;
+ default:
+ {
+ SysLog(NID_UI, "Window Manager Rotation Default");
+ }
+ break;
+ }
+ }
}
else
{
#if defined(WINDOW_BASE_ROTATE)
void
-_OrientationAgent::UpdateOrientation(void)
+_OrientationAgent::UpdateOrientation(bool force)
{
_EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
if (!pEcoreEvas)
return;
}
- int rotation = pEcoreEvas->GetWindowRotation(*(pImpl->GetCore().GetRootWindow()));
+ int rotation = 0;
+
+ _Window* pWindow = pImpl->GetCore().GetRootWindow();
+ if (pWindow)
+ {
+ rotation = pEcoreEvas->GetWindowRotation(*pWindow);
+ }
// Update evas objects.
OrientationStatus status = ORIENTATION_STATUS_NONE;
break;
}
+ if (force)
+ {
+ status = __tempStatus;
+ }
+
if (__updateStatus == true)
{
__statusChanged = false;
switch (orientation)
{
case ORIENTATION_PORTRAIT:
- pEcoreEvas->SetWindowPreferredRotation(window, 0);
-
- if ((deviceOrientation == 0) || (windowRotation == 0))
{
- callback = false;
+ pEcoreEvas->SetWindowPreferredRotation(window, 0);
+
+ __tempStatus = ORIENTATION_STATUS_PORTRAIT;
+ UpdateOrientation(true);
+
+ return;
+
+ /*
+ if ((deviceOrientation == 0) || (windowRotation == 0))
+ {
+ callback = false;
+ }
+ */
}
-
break;
case ORIENTATION_LANDSCAPE:
- pEcoreEvas->SetWindowPreferredRotation(window, 270);
-
- if ((deviceOrientation == 270) || (windowRotation == 270))
{
- callback = false;
+ pEcoreEvas->SetWindowPreferredRotation(window, 270);
+
+ __tempStatus = ORIENTATION_STATUS_LANDSCAPE;
+ UpdateOrientation(true);
+
+ return;
+
+ /*
+ if ((deviceOrientation == 270) || (windowRotation == 270))
+ {
+ callback = false;
+ }
+ */
}
-
break;
case ORIENTATION_PORTRAIT_REVERSE:
- pEcoreEvas->SetWindowPreferredRotation(window, 180);
-
- if ((deviceOrientation == 180) || (windowRotation == 180))
{
- callback = false;
- }
+ pEcoreEvas->SetWindowPreferredRotation(window, 180);
+ __tempStatus = ORIENTATION_STATUS_PORTRAIT_REVERSE;
+ UpdateOrientation(true);
+
+ return;
+
+ /*
+ if ((deviceOrientation == 180) || (windowRotation == 180))
+ {
+ callback = false;
+ }
+ */
+ }
break;
case ORIENTATION_LANDSCAPE_REVERSE:
- pEcoreEvas->SetWindowPreferredRotation(window, 90);
-
- if ((deviceOrientation == 90) || (windowRotation == 90))
{
- callback = false;
+ pEcoreEvas->SetWindowPreferredRotation(window, 90);
+
+ __tempStatus = ORIENTATION_STATUS_LANDSCAPE_REVERSE;
+ UpdateOrientation(true);
+
+ return;
+
+ /*
+ if ((deviceOrientation == 90) || (windowRotation == 90))
+ {
+ callback = false;
+ }
+ */
}
-
break;
case ORIENTATION_AUTOMATIC:
{