summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorUmesh Tanwar <umesh.tanwar@samsung.com>2016-03-18 11:56:59 -0700
committerCedric Bail <cedric@osg.samsung.com>2016-03-18 11:58:02 -0700
commit1adb1962de0d9ca64cf34c3ae56245ae654b54d1 (patch)
treebffac1b94b21031c235f5c6286b0eca3e7d7fec6 /legacy
parenta0f37fad24445c2669c249fd96fbbec1a2c8d365 (diff)
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
Diffstat (limited to 'legacy')
-rw-r--r--legacy/elementary/src/lib/elm_widget.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/legacy/elementary/src/lib/elm_widget.c b/legacy/elementary/src/lib/elm_widget.c
index b110f323a7..4121519263 100644
--- a/legacy/elementary/src/lib/elm_widget.c
+++ b/legacy/elementary/src/lib/elm_widget.c
@@ -792,6 +792,27 @@ _elm_widget_focus_highlight_style_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data
792} 792}
793 793
794static void 794static void
795_child_focus_order_update(Evas_Object* parent, Evas_Object* obj)
796{
797 const Eina_List *l;
798 Evas_Object *child;
799 ELM_WIDGET_DATA_GET(parent, sdp);
800 EINA_LIST_FOREACH(sdp->subobjs, l, child)
801 {
802 if (!_elm_widget_is(child) || (child == obj)) continue;
803 ELM_WIDGET_DATA_GET(child,sdc);
804
805 if(sdc->can_focus || (sdc->child_can_focus))
806 {
807 focus_order++;
808 sdc->focus_order = focus_order;
809 }
810 _child_focus_order_update(child, NULL);
811 }
812
813}
814
815static void
795_parent_focus(Evas_Object *obj, Elm_Object_Item *item) 816_parent_focus(Evas_Object *obj, Elm_Object_Item *item)
796{ 817{
797 API_ENTRY return; 818 API_ENTRY return;
@@ -820,6 +841,8 @@ _parent_focus(Evas_Object *obj, Elm_Object_Item *item)
820 841
821 if (_elm_config->access_mode == ELM_ACCESS_MODE_ON) 842 if (_elm_config->access_mode == ELM_ACCESS_MODE_ON)
822 _elm_access_highlight_set(obj); 843 _elm_access_highlight_set(obj);
844
845 if (o) _child_focus_order_update(o, obj);
823} 846}
824 847
825static void 848static void