From a356004af9ea133504e3c60dacef51cf68798774 Mon Sep 17 00:00:00 2001 From: Jaehwan Kim 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. SVN revision: 59105 --- legacy/elementary/src/lib/els_scroller.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/legacy/elementary/src/lib/els_scroller.c b/legacy/elementary/src/lib/els_scroller.c index f2f75fba12..5b4441d8ba 100644 --- a/legacy/elementary/src/lib/els_scroller.c +++ b/legacy/elementary/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);