elm_interface_scrollable: fix resize after drag bug.
authorwonguk.jeong <wonguk.jeong@samsung.com>
Mon, 21 Apr 2014 05:17:43 +0000 (14:17 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Mon, 21 Apr 2014 05:17:43 +0000 (14:17 +0900)
Summary:
after I drag by using scrollbar, if I resize window, the scroller position was moved to coordication before dragging.
invoke _elm_scroll_wanted_coordinates_update() after position setting in _elm_scroll_scroll_bar_read_and_update();

@fix

Test Plan: elementary_test -> drag scroller to center -> resize window -> scroller shouldn't go back to top

Reviewers: raster, woohyun, seoz

CC: seoz, Hermet
Differential Revision: https://phab.enlightenment.org/D722

src/lib/elm_interface_scrollable.c

index c7226de..61610e2 100644 (file)
@@ -45,6 +45,10 @@ static void
 _elm_scroll_scroll_to_y(Elm_Scrollable_Smart_Interface_Data *sid,
                         double t_in,
                         Evas_Coord pos_y);
+static void
+_elm_scroll_wanted_coordinates_update(Elm_Scrollable_Smart_Interface_Data *sid,
+                                      Evas_Coord x,
+                                      Evas_Coord y);
 static double
 _round(double value, int pos)
 {
@@ -889,6 +893,7 @@ _elm_scroll_scroll_bar_read_and_update(
    x = _round(vx * (double)mx + minx, 1);
    y = _round(vy * (double)my + miny, 1);
    eo_do(sid->obj, elm_interface_scrollable_content_pos_set(x, y, EINA_TRUE));
+   _elm_scroll_wanted_coordinates_update(sid, x, y);
 }
 
 static void