raster pushed a commit to branch efl-1.20.

http://git.enlightenment.org/core/efl.git/commit/?id=a239d1eb0cf3b1ff8882a2310c51b231e20edd1f

commit a239d1eb0cf3b1ff8882a2310c51b231e20edd1f
Author: Hosang Kim <hosang12....@samsung.com>
Date:   Fri Aug 25 14:53:09 2017 +0900

    scroller: fix getting content position.
    
    Summary:
    Widgets that don't have content like as genlist, gengrid.
    They don't have geometry of content also.
    So position of pan will be used when calculating postion to scroll.
    
    Test Plan:
    tested in elementary_test and check working properly.
    this may be the problem when extern pan set on scrollable interface.
    
    Reviewers: SanghyeonLee, cedric, felipealmeida, larry, bu5hm4n
    
    Reviewed By: SanghyeonLee
    
    Subscribers: cedric, jpeg
    
    Differential Revision: https://phab.enlightenment.org/D5127
---
 src/lib/elementary/elm_interface_scrollable.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/lib/elementary/elm_interface_scrollable.c 
b/src/lib/elementary/elm_interface_scrollable.c
index 4753a7ba54..89fb972e39 100644
--- a/src/lib/elementary/elm_interface_scrollable.c
+++ b/src/lib/elementary/elm_interface_scrollable.c
@@ -4703,17 +4703,16 @@ EOLIAN static void
 _elm_interface_scrollable_efl_ui_focus_manager_focus(Eo *obj, 
Elm_Scrollable_Smart_Interface_Data *pd EINA_UNUSED, Efl_Ui_Focus_Object *focus)
 {
    Eina_Rectangle geom;
-   Eina_Rectangle obj_geom;
+   int pan_x, pan_y;
 
    efl_ui_focus_manager_focus(efl_super(obj, MY_SCROLLABLE_INTERFACE), focus);
 
    if (!focus) return;
 
    evas_object_geometry_get(focus, &geom.x, &geom.y, &geom.w, &geom.h);
-   evas_object_geometry_get(pd->content, &obj_geom.x, &obj_geom.y, 
&obj_geom.w, &obj_geom.h);
-
-   geom.x = geom.x - obj_geom.x;
-   geom.y = geom.y - obj_geom.y;
+   elm_obj_pan_pos_get(pd->pan_obj, &pan_x, &pan_y);
+   geom.x = geom.x + pan_x;
+   geom.y = geom.y + pan_y;
 
    elm_interface_scrollable_region_bring_in(obj, geom.x, geom.y, geom.w, 
geom.h);
 }

-- 


Reply via email to