bu5hm4n pushed a commit to branch master.

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

commit 3184e0f550ac1dc7a0a247cd38df4692bf82c82d
Author: Marcel Hollerbach <mar...@osg.samsung.com>
Date:   Thu Oct 19 14:02:11 2017 +0200

    elm_interface_scrollable: do not scroll to a focused element by default
    
    this can be done in the implementing other widgets
---
 src/lib/elementary/elm_interface_scrollable.c  | 48 +-------------------------
 src/lib/elementary/elm_interface_scrollable.eo |  1 -
 2 files changed, 1 insertion(+), 48 deletions(-)

diff --git a/src/lib/elementary/elm_interface_scrollable.c 
b/src/lib/elementary/elm_interface_scrollable.c
index 11984c7abb..77f480f174 100644
--- a/src/lib/elementary/elm_interface_scrollable.c
+++ b/src/lib/elementary/elm_interface_scrollable.c
@@ -4657,29 +4657,6 @@ _elm_interface_scrollable_class_constructor(Efl_Class 
*klass)
 EAPI void elm_pan_gravity_set(Elm_Pan *obj EINA_UNUSED, double x EINA_UNUSED, 
double y EINA_UNUSED) {}
 EAPI void elm_pan_gravity_get(const Elm_Pan *obj EINA_UNUSED, double *x 
EINA_UNUSED, double *y EINA_UNUSED) {}
 
-static void
-_focused_element(void *data, const Efl_Event *event)
-{
-   Eina_Rect geom;
-   Efl_Ui_Focus_Object *obj = data;
-   Efl_Ui_Focus_Object *focus = event->info;
-   Elm_Scrollable_Smart_Interface_Data *pd;
-   Eina_Position2D pos;
-   int pan_x, pan_y;
-
-   pd = efl_data_scope_get(obj, MY_SCROLLABLE_INTERFACE);
-
-   if (!focus) return;
-
-   geom = efl_ui_focus_object_focus_geometry_get(focus);
-   pos = efl_gfx_position_get(obj);
-   elm_obj_pan_pos_get(pd->pan_obj, &pan_x, &pan_y);
-   geom.x = geom.x + pan_x - pos.x;
-   geom.y = geom.y + pan_y - pos.y;
-
-   elm_interface_scrollable_region_bring_in(obj, geom.x, geom.y, geom.w, 
geom.h);
-}
-
 EOLIAN static Efl_Ui_Focus_Manager*
 _elm_interface_scrollable_elm_widget_focus_manager_create(Eo *obj EINA_UNUSED, 
Elm_Scrollable_Smart_Interface_Data *pd EINA_UNUSED, Efl_Ui_Focus_Object *root)
 {
@@ -4699,7 +4676,7 @@ _elm_interface_scrollable_efl_object_constructor(Eo *obj, 
Elm_Scrollable_Smart_I
 
    efl_composite_attach(obj, pd->manager);
 
-   efl_event_callback_add(pd->manager, EFL_UI_FOCUS_MANAGER_EVENT_FOCUSED, 
_focused_element, obj);
+   _efl_ui_focus_manager_redirect_events_add(pd->manager, obj);
 
    return efl_constructor(efl_super(obj, MY_SCROLLABLE_INTERFACE));
 }
@@ -4727,29 +4704,6 @@ 
_elm_interface_scrollable_efl_ui_focus_manager_border_elements_get(Eo *obj, Elm_
 }
 
 EOLIAN static void
-_elm_interface_scrollable_efl_ui_focus_manager_focus_set(Eo *obj, 
Elm_Scrollable_Smart_Interface_Data *pd EINA_UNUSED, Efl_Ui_Focus_Object *focus)
-{
-   Eina_Rect geom;
-   Eina_Position2D pos;
-   int pan_x, pan_y;
-
-   EINA_SAFETY_ON_NULL_RETURN(focus);
-   efl_ui_focus_manager_focus_set(efl_super(obj, MY_SCROLLABLE_INTERFACE), 
focus);
-
-   geom = efl_ui_focus_object_focus_geometry_get(focus);
-   pos = efl_gfx_position_get(obj);
-   elm_obj_pan_pos_get(pd->pan_obj, &pan_x, &pan_y);
-   geom.x = geom.x + pan_x - pos.x;
-   geom.y = geom.y + pan_y - pos.y;
-
-   elm_interface_scrollable_region_bring_in(obj, geom.x, geom.y, geom.w, 
geom.h);
-
-   geom = efl_gfx_geometry_get(obj);
-   geom.x = geom.y = 0;
-   elm_widget_show_region_set(obj, geom, EINA_TRUE);
-}
-
-EOLIAN static void
 _elm_interface_scrollable_item_loop_enabled_set(Eo *obj EINA_UNUSED, 
Elm_Scrollable_Smart_Interface_Data *pd EINA_UNUSED, Eina_Bool enable 
EINA_UNUSED)
 {
 }
diff --git a/src/lib/elementary/elm_interface_scrollable.eo 
b/src/lib/elementary/elm_interface_scrollable.eo
index d3381e01fb..6db254567a 100644
--- a/src/lib/elementary/elm_interface_scrollable.eo
+++ b/src/lib/elementary/elm_interface_scrollable.eo
@@ -669,7 +669,6 @@ mixin Elm.Interface_Scrollable(Efl.Ui.Scrollable, 
Efl.Ui.Focus.Manager.Sub, Elm.
       class.constructor;
       Efl.Object.constructor;
       Efl.Ui.Focus.Manager.border_elements { get; }
-      Efl.Ui.Focus.Manager.focus {set; }
       Elm.Widget.focus_manager_create;
    }
    events {

-- 


Reply via email to