forked from enlightenment/efl
elm_win: fix correct rot variable in elm_win_rotation_get
Remove duplicated rotation variable Also, it fixes wrong layout class comparing. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8464
This commit is contained in:
parent
2b9278c984
commit
476010b018
|
@ -213,7 +213,6 @@ struct _Efl_Ui_Win_Data
|
|||
int norender;
|
||||
int modal_count;
|
||||
int response;
|
||||
int rotation;
|
||||
Eina_Bool req_wh : 1;
|
||||
Eina_Bool req_xy : 1;
|
||||
|
||||
|
@ -1676,7 +1675,7 @@ _efl_ui_win_win_rotation_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd, int rotat
|
|||
it = efl_ui_widget_tree_widget_iterator(obj);
|
||||
EINA_ITERATOR_FOREACH(it, widget)
|
||||
{
|
||||
if (!efl_isa(widget, EFL_UI_LAYOUT_CLASS)) continue;
|
||||
if (!efl_isa(widget, EFL_UI_LAYOUT_BASE_CLASS)) continue;
|
||||
|
||||
if (efl_ui_layout_automatic_theme_rotation_get(widget))
|
||||
efl_ui_layout_theme_rotation_apply(widget, rot);
|
||||
|
@ -1686,7 +1685,7 @@ _efl_ui_win_win_rotation_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd, int rotat
|
|||
EOLIAN static int
|
||||
_efl_ui_win_win_rotation_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd)
|
||||
{
|
||||
return pd->rotation;
|
||||
return pd->rot;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
|
|
@ -449,6 +449,19 @@ EFL_START_TEST(efl_ui_win_multi_touch_inputs)
|
|||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(elm_win_test_rotation)
|
||||
{
|
||||
Evas_Object *win;
|
||||
|
||||
win = win_add(NULL, "win", ELM_WIN_BASIC);
|
||||
|
||||
elm_win_rotation_set(win, 90);
|
||||
ck_assert_int_eq(elm_win_rotation_get(win), 90);
|
||||
elm_win_rotation_with_resize_set(win, 180);
|
||||
ck_assert_int_eq(elm_win_rotation_get(win), 180);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
void elm_test_win(TCase *tc)
|
||||
{
|
||||
tcase_add_test(tc, elm_win_legacy_type_check);
|
||||
|
@ -458,6 +471,7 @@ void elm_test_win(TCase *tc)
|
|||
tcase_add_test(tc, elm_win_test_exit_on_close);
|
||||
tcase_add_test(tc, elm_win_test_app_exit_on_windows_close);
|
||||
tcase_add_test(tc, efl_ui_win_multi_touch_inputs);
|
||||
tcase_add_test(tc, elm_win_test_rotation);
|
||||
#ifdef HAVE_ELEMENTARY_X
|
||||
tcase_add_test(tc, elm_win_autohide);
|
||||
tcase_add_test(tc, elm_win_autohide_and_policy_quit_last_window_hidden);
|
||||
|
|
Loading…
Reference in New Issue