Previously toast popup handled all possible rotations: 0, 90, 180, 270.
Now popup rotation is restricted only to rotation of current top window.
Change-Id: Ie2bdac84db47caef5b73a83295ebdd453581bda0
break;
default:
_E("Unahandled rotation value");
+ return;
}
+ info->angle = angle;
}
int indicator_tzsh_init(win_info *info)
elm_win_title_set(toast_window, "toast");
if (elm_win_wm_rotation_supported_get(toast_window)) {
- int rots[4] = { 0, 90, 180, 270 };
- elm_win_wm_rotation_available_rotations_set(toast_window, (const int *)(&rots), 4);
+ int rots[1] = { s_info.app_data->win.angle };
+ elm_win_wm_rotation_available_rotations_set(toast_window,
+ (const int *)(&rots), ARRAY_SIZE(rots));
}
evas_object_show(toast_window);
evas_object_hide(win);
if (elm_win_wm_rotation_supported_get(win)) {
- int rots[4] = { 0, 90, 180, 270 };
- elm_win_wm_rotation_available_rotations_set(win, rots, 4);
+ int rots[1] = { ad->win.angle };
+ elm_win_wm_rotation_available_rotations_set(win, rots, ARRAY_SIZE(rots));
}
evas_object_smart_callback_add(win, "wm,rotation,changed", _rotate_cb, ad);