[*][Scroller] merge from upstream revision 64051, but didn't accept data/theme/widget...
[framework/uifw/elementary.git] / src / lib / els_scroller.c
index 3cc79ec..484efdb 100644 (file)
@@ -1847,6 +1847,8 @@ _smart_event_mouse_up(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *ev
    sd = data;
    ev = event_info;
    sd->down.hold_parent = 0;
+   sd->down.dx = 0;
+   sd->down.dy = 0;
    //   if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return ;
    evas_post_event_callback_push(e, _smart_event_post_up, sd);
    // FIXME: respect elm_widget_scroll_hold_get of parent container
@@ -1898,7 +1900,7 @@ _smart_event_mouse_up(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *ev
                        ax /= (i + 1);
                        ay /= (i + 1);
                        at /= (i + 1);
-                       at *= 4.0; // magic number! just trial and error shows this makes it behave "nicer" and not run off at high speed all the time
+                       at /= _elm_config->thumbscroll_sensitivity_friction;
                        dx = ev->canvas.x - ax;
                        dy = ev->canvas.y - ay;
                        if (at > 0)
@@ -2031,8 +2033,6 @@ _smart_event_mouse_up(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *ev
                {
                   ecore_animator_del(sd->down.hold_animator);
                   sd->down.hold_animator = NULL;
-                  if (sd->child.resized)
-                    _elm_smart_scroller_wanted_region_set(sd->smart_obj);
                }
              if (sd->down.scroll)
                {