summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-05-30 16:56:54 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-05-30 16:57:14 +0200
commit65deb248e3849851943b2f5c693c7e2a2e909f69 (patch)
treed312f80c4d9dc54394265d45159f86ea4fe06bdd
parent9cba6a4f0e9d76935c7c6875b94aaa0bf790097c (diff)
efl_ui_active_view_manager_*: fix bugging animation
Summary: we should protect against multiple requests to the same "to" index. Otherwise either the speed could increase dramatically, or we start to oscilate arround the final position, based on the progress sign. Those ifs here are fixing it. fix T7988 Reviewers: segfaultxavi Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7988 Differential Revision: https://phab.enlightenment.org/D9056
-rw-r--r--src/lib/elementary/efl_ui_active_view_view_manager_scroll.c7
-rw-r--r--src/lib/elementary/efl_ui_active_view_view_manager_stack.c3
2 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_active_view_view_manager_scroll.c b/src/lib/elementary/efl_ui_active_view_view_manager_scroll.c
index ff185a6586..975a5df5d1 100644
--- a/src/lib/elementary/efl_ui_active_view_view_manager_scroll.c
+++ b/src/lib/elementary/efl_ui_active_view_view_manager_scroll.c
@@ -233,6 +233,13 @@ _page_set_animation(void *data, const Efl_Event *event EINA_UNUSED)
233static void 233static void
234_animation_request_switch(Eo *obj, Efl_Ui_Active_View_View_Manager_Scroll_Data *pd, int from, int to) 234_animation_request_switch(Eo *obj, Efl_Ui_Active_View_View_Manager_Scroll_Data *pd, int from, int to)
235{ 235{
236 //if there is already a transition ongoing, which is no mouse transition, but goes to the same position, then do nothing
237 if (pd->transition.active && !pd->mouse_move.active && pd->transition.to == to)
238 return;
239
240 if (!pd->transition.active && !pd->mouse_move.active && from == to)
241 return;
242
236 efl_event_callback_del(pd->container, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _page_set_animation, obj); 243 efl_event_callback_del(pd->container, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _page_set_animation, obj);
237 //if there is a ongoing transition, try to guess a better time, and try copy over the position where we are right now 244 //if there is a ongoing transition, try to guess a better time, and try copy over the position where we are right now
238 if (pd->transition.active || pd->mouse_move.active) 245 if (pd->transition.active || pd->mouse_move.active)
diff --git a/src/lib/elementary/efl_ui_active_view_view_manager_stack.c b/src/lib/elementary/efl_ui_active_view_view_manager_stack.c
index 65e8790d1f..ad2038a0be 100644
--- a/src/lib/elementary/efl_ui_active_view_view_manager_stack.c
+++ b/src/lib/elementary/efl_ui_active_view_view_manager_stack.c
@@ -182,6 +182,9 @@ _setup_anim(Efl_Animation_Player *player, Efl_Gfx_Entity *entity)
182EOLIAN static void 182EOLIAN static void
183_efl_ui_active_view_view_manager_stack_efl_ui_active_view_view_manager_switch_to(Eo *obj, Efl_Ui_Active_View_View_Manager_Stack_Data *pd, int from, int to) 183_efl_ui_active_view_view_manager_stack_efl_ui_active_view_view_manager_switch_to(Eo *obj, Efl_Ui_Active_View_View_Manager_Stack_Data *pd, int from, int to)
184{ 184{
185 if (efl_pack_content_get(pd->container, to) == pd->content)
186 return;
187
185 if (from != -1) 188 if (from != -1)
186 { 189 {
187 if (pd->animation) 190 if (pd->animation)