diff options
author | Umesh Tanwar <umesh.tanwar@samsung.com> | 2016-03-18 11:56:59 -0700 |
---|---|---|
committer | Cedric Bail <cedric@osg.samsung.com> | 2016-03-18 11:58:02 -0700 |
commit | b78720016a9023cb57ec2a05c8cfbdf6eeae600f (patch) | |
tree | bc95dd5b2aed8b272ced4b94d434806ed3d19d51 | |
parent | 7e801846e9c77328f42364f5b9aebe3d4b75b812 (diff) | |
download | elementary-b78720016a9023cb57ec2a05c8cfbdf6eeae600f.tar.gz |
elm_widget: update child object focus_order.
Summary:
_parent_focus() when called recursively updates the
sd->focus_order for parent obeject only. The sibling's sd->focus_order
not get updated.
So updated the focus_order for siblings.
Signed-off-by: Umesh Tanwar <umesh.tanwar@samsung.com>
Test Plan:
{F30149}
correct case:
1. Press Enter key on click button. A popoup will come.
2. Pressing enter key on popup button the popup hides and focus goes back to click button.
issue case:
1. Press Enter key on click button. A popoup will come.
2. press Alt+tab twice.
3. Pressing enter key on popup button the popup hides and focus does not go back to click button.
Reviewers: raster, cedric
Subscribers: singh.amitesh
Differential Revision: https://phab.enlightenment.org/D3807
-rw-r--r-- | src/lib/elm_widget.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c index b110f323a..412151926 100644 --- a/src/lib/elm_widget.c +++ b/src/lib/elm_widget.c @@ -792,6 +792,27 @@ _elm_widget_focus_highlight_style_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data } static void +_child_focus_order_update(Evas_Object* parent, Evas_Object* obj) +{ + const Eina_List *l; + Evas_Object *child; + ELM_WIDGET_DATA_GET(parent, sdp); + EINA_LIST_FOREACH(sdp->subobjs, l, child) + { + if (!_elm_widget_is(child) || (child == obj)) continue; + ELM_WIDGET_DATA_GET(child,sdc); + + if(sdc->can_focus || (sdc->child_can_focus)) + { + focus_order++; + sdc->focus_order = focus_order; + } + _child_focus_order_update(child, NULL); + } + +} + +static void _parent_focus(Evas_Object *obj, Elm_Object_Item *item) { API_ENTRY return; @@ -820,6 +841,8 @@ _parent_focus(Evas_Object *obj, Elm_Object_Item *item) if (_elm_config->access_mode == ELM_ACCESS_MODE_ON) _elm_access_highlight_set(obj); + + if (o) _child_focus_order_update(o, obj); } static void |