From 23691191db98bfef499423d626579d20ecb51181 Mon Sep 17 00:00:00 2001 From: raster Date: Mon, 2 May 2011 09:22:50 +0000 Subject: [PATCH] From: Jaehwan Kim Subject: [E-devel] [Patch] els_scroller bug patch. I and Seoz found some problem about _elm_smart_scroller_wanted_region_set in els_scroller. While genlist items are appended, momentum animation in scroller cannot operate. It's why _elm_smart_Scroller_wanted_region_set is called continually. It's the problem which Seoz told you. and I fixed this problem. Please check the attached patch file. If you want to check the problem. Set the "Thumb scroll friction" in elementary_config to 2~3. Change the file "test_genlist.c" in elementary/src/bin like below. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@59105 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/els_scroller.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/els_scroller.c b/src/lib/els_scroller.c index f2f75fb..5b4441d 100644 --- a/src/lib/els_scroller.c +++ b/src/lib/els_scroller.c @@ -814,6 +814,7 @@ _smart_momentum_animator(void *data) y = py; } elm_smart_scroller_child_pos_set(sd->smart_obj, x, y); + _update_wanted_coordinates(sd, x, y); sd->pan_func.max_get(sd->pan_obj, &maxx, &maxy); sd->pan_func.min_get(sd->pan_obj, &minx, &miny); if (!sd->bounce_horiz) @@ -831,7 +832,6 @@ _smart_momentum_animator(void *data) (no_bounce_x_end && no_bounce_y_end)) { _smart_anim_stop(sd->smart_obj); - _update_wanted_coordinates(sd, px, py); sd->down.momentum_animator = NULL; sd->down.bounce_x_hold = 0; @@ -1322,6 +1322,10 @@ _elm_smart_scroller_wanted_region_set(Evas_Object *obj) INTERNAL_ENTRY; Evas_Coord ww, wh, wx = sd->wx; + if (sd->down.now || sd->down.momentum_animator || + sd->down.bounce_x_animator || sd->down.bounce_y_animator || + sd->down.hold_animator || sd->down.onhold_animator) return; + /* Flip to RTL cords only if init in RTL mode */ if(sd->is_mirrored) wx = _elm_smart_scroller_x_mirrored_get(obj, sd->wx); -- 2.7.4