bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8ae4dbfb3f63b61d1f08a1fc983d59c742011093
commit 8ae4dbfb3f63b61d1f08a1fc983d59c742011093 Author: Marcel Hollerbach <m...@marcel-hollerbach.de> Date: Tue Jun 4 20:11:43 2019 +0200 efl_ui_active_view: fix view_manager_scroll the problem that can be observed when clicking permanently on a view in the view_manager_scroll. You will see things jump arround uncontrolled, then when you quickly drag and drop, you will also see a lot of weird moving arround artifacts. The reason for this is, that progress was not correctly resetted, additionally, mouse_active also was not resetted correctly in one case. fix T7988 Reviewed-by: Jaehyun Cho <jae_hyun....@samsung.com> Differential Revision: https://phab.enlightenment.org/D9074 --- src/lib/elementary/efl_ui_active_view_view_manager_scroll.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 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 975a5df5d1..6918703cf1 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 @@ -226,6 +226,7 @@ _page_set_animation(void *data, const Efl_Event *event EINA_UNUSED) efl_event_callback_del(pd->container, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _page_set_animation, data); pd->transition.active = EINA_FALSE; + pd->transition.progress = 0.0; } _apply_box_properties(data, pd); } @@ -237,8 +238,12 @@ _animation_request_switch(Eo *obj, Efl_Ui_Active_View_View_Manager_Scroll_Data * if (pd->transition.active && !pd->mouse_move.active && pd->transition.to == to) return; - if (!pd->transition.active && !pd->mouse_move.active && from == to) - return; + //In case there is no transition but from and to are the same, ensure that we reset the mouse_move state, and return. + if (!pd->transition.active && from == to) + { + pd->mouse_move.active = EINA_FALSE; + return; + } efl_event_callback_del(pd->container, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _page_set_animation, obj); //if there is a ongoing transition, try to guess a better time, and try copy over the position where we are right now @@ -247,13 +252,14 @@ _animation_request_switch(Eo *obj, Efl_Ui_Active_View_View_Manager_Scroll_Data * pd->transition.from = MIN(pd->transition.from, pd->transition.to) + pd->transition.progress; pd->transition.max_time = MIN(MAX(fabs(pd->transition.progress), 0.2), 0.5f); pd->mouse_move.active = EINA_FALSE; - pd->transition.progress = 0.0f; } else { pd->transition.from = from; pd->transition.max_time = 0.5; + pd->transition.progress = 0.0; } + pd->transition.start_time = ecore_loop_time_get(); pd->transition.active = EINA_TRUE; pd->transition.to = to; @@ -271,6 +277,7 @@ _efl_ui_active_view_view_manager_scroll_efl_ui_active_view_view_manager_switch_t { pd->mouse_move.active = EINA_FALSE; pd->transition.active = EINA_FALSE; + pd->transition.progress = 0.0; _apply_box_properties(obj, pd); } } --