Set default preferred rotation to 0 30/99830/3 accepted/tizen/3.0/common/20161208.153453 accepted/tizen/3.0/ivi/20161208.062748 accepted/tizen/3.0/mobile/20161208.062515 accepted/tizen/3.0/tv/20161208.062606 accepted/tizen/3.0/wearable/20161208.062700 submit/tizen_3.0/20161207.072901
authorHyunho Kang <hhstark.kang@samsung.com>
Thu, 24 Nov 2016 08:03:15 +0000 (17:03 +0900)
committerHyunho Kang <hhstark.kang@samsung.com>
Wed, 7 Dec 2016 08:16:30 +0000 (00:16 -0800)
Some devices set all applications preferred rotation to 90 degree
widget app sould not be rotated becasue viewer will be rotated

Change-Id: I1ad6204423ee7845c4ccf21614fc8eaae246bc01
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
src/widget_app.c

index 8898766..4ee4e2e 100755 (executable)
@@ -1362,6 +1362,7 @@ EXPORT_API int widget_app_get_elm_win(widget_context_h context,
        Ecore_Wl_Window *wl_win;
        struct wl_surface *surface;
        char buffer[256];
+       int rots[3] = {0};
 
        if (!_is_widget_feature_enabled()) {
                _E("not supported"); /* LCOV_EXCL_LINE */
@@ -1378,6 +1379,9 @@ EXPORT_API int widget_app_get_elm_win(widget_context_h context,
                goto fault; /* LCOV_EXCL_LINE */
        }
 
+       elm_win_wm_rotation_preferred_rotation_set(ret_win, -1);
+       elm_win_wm_rotation_available_rotations_set(ret_win, rots, 1);
+
        wl_win = elm_win_wl_window_get(ret_win);
        if (wl_win == NULL) {
                _E("failed to get wayland window"); /* LCOV_EXCL_LINE */