On Jan 20, 2016 00:17, "Minkyu Kang" <mk7.k...@samsung.com> wrote: > > hermet pushed a commit to branch master. > > http://git.enlightenment.org/core/elementary.git/commit/?id=163d1c8b88fc613a4700cecc93f83f7136da0873 > > commit 163d1c8b88fc613a4700cecc93f83f7136da0873 > Author: Minkyu Kang <mk7.k...@samsung.com> > Date: Wed Jan 20 17:15:45 2016 +0900 > > elm_widget: use internal function for clearing the focus > > Summary: > This patch will remove duplicate logic > > Signed-off-by: Minkyu Kang <mk7.k...@samsung.com>
This look also not like a fix. Cedric > Reviewers: seoz, Hermet, cedric > > Subscribers: seoz > > Differential Revision: https://phab.enlightenment.org/D3573 > --- > src/lib/elm_widget.c | 34 ++++++++++------------------------ > 1 file changed, 10 insertions(+), 24 deletions(-) > > diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c > index 11d4ee0..b779994 100644 > --- a/src/lib/elm_widget.c > +++ b/src/lib/elm_widget.c > @@ -2914,10 +2914,9 @@ _elm_widget_parent_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd) > return sd->parent_obj; > } > > -EOLIAN static void > -_elm_widget_focused_object_clear(Eo *obj, Elm_Widget_Smart_Data *sd) > +static void > +_focused_object_clear(Elm_Widget_Smart_Data *sd) > { > - if (!sd->focused) return; > if (sd->resize_obj && elm_widget_is(sd->resize_obj) && > elm_widget_focus_get(sd->resize_obj)) > { > @@ -2936,6 +2935,13 @@ _elm_widget_focused_object_clear(Eo *obj, Elm_Widget_Smart_Data *sd) > } > } > } > +} > + > +EOLIAN static void > +_elm_widget_focused_object_clear(Eo *obj, Elm_Widget_Smart_Data *sd) > +{ > + if (!sd->focused) return; > + _focused_object_clear(sd); > sd->focused = EINA_FALSE; > eo_do(obj, elm_obj_widget_on_focus(NULL)); > } > @@ -2968,27 +2974,7 @@ _elm_widget_focus_steal(Eo *obj, Elm_Widget_Smart_Data *sd, Elm_Object_Item *ite > if (!parent2) parent2 = elm_widget_parent2_get(parent); > parent = parent2; > sd = eo_data_scope_get(parent, MY_CLASS); > - if (sd) > - { > - if (sd->resize_obj && elm_widget_is(sd->resize_obj) && > - elm_widget_focus_get(sd->resize_obj)) > - { > - eo_do(sd->resize_obj, elm_obj_widget_focused_object_clear()); > - } > - else > - { > - const Eina_List *l; > - Evas_Object *child; > - EINA_LIST_FOREACH(sd->subobjs, l, child) > - { > - if (_elm_widget_is(child) && elm_widget_focus_get(child)) > - { > - eo_do(child, elm_obj_widget_focused_object_clear()); > - break; > - } > - } > - } > - } > + if (sd) _focused_object_clear(sd); > } > _parent_focus(obj, item); > elm_widget_focus_region_show(obj); > > -- > > > ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel