static int app_argc = 0;
static char** app_argv = NULL;
+const int WIN_ORIENTATION_PORTRAIT_PRIMARY_ANGLE = 0;
+const int WIN_ORIENTATION_LANDSCAPE_PRIMARY_ANGLE = 270;
+const int W3C_ORIENTATION_PORTRAIT_PRIMARY_ANGLE = 0;
+const int W3C_ORIENTATION_LANDSCAPE_PRIMARY_ANGLE = 90;
+
WrtClient::WrtClient(int argc, char **argv) :
Application(argc, argv, "wrt-client", false),
DPL::TaskDecl<WrtClient>(this),
WidgetSettingScreenLock rotationValue = settings.getRotationValue();
if (rotationValue == Screen_Portrait) {
- elm_win_rotation_with_resize_set(m_windowData->m_win, 0);
- ewk_view_orientation_send(m_widget->GetCurrentWebview(), 0);
+ elm_win_wm_rotation_preferred_rotation_set(
+ m_windowData->m_win,
+ WIN_ORIENTATION_PORTRAIT_PRIMARY_ANGLE);
+ ewk_view_orientation_send(
+ m_widget->GetCurrentWebview(),
+ W3C_ORIENTATION_PORTRAIT_PRIMARY_ANGLE);
} else if (rotationValue == Screen_Landscape) {
- elm_win_rotation_with_resize_set(m_windowData->m_win, 270);
- ewk_view_orientation_send(m_widget->GetCurrentWebview(), 90);
+ elm_win_wm_rotation_preferred_rotation_set(
+ m_windowData->m_win,
+ WIN_ORIENTATION_LANDSCAPE_PRIMARY_ANGLE);
+ ewk_view_orientation_send(
+ m_widget->GetCurrentWebview(),
+ W3C_ORIENTATION_LANDSCAPE_PRIMARY_ANGLE);
} else {
- elm_win_rotation_with_resize_set(m_windowData->m_win, 0);
- ewk_view_orientation_send(m_widget->GetCurrentWebview(), 0);
+ elm_win_wm_rotation_preferred_rotation_set(
+ m_windowData->m_win,
+ WIN_ORIENTATION_PORTRAIT_PRIMARY_ANGLE);
+ ewk_view_orientation_send(
+ m_widget->GetCurrentWebview(),
+ W3C_ORIENTATION_PORTRAIT_PRIMARY_ANGLE);
}
}
}