summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYeongjong Lee <cleanlyj@naver.com>2018-02-20 15:10:21 +0100
committerMarcel Hollerbach <marcel@osg.samsung.com>2018-02-20 16:48:42 +0100
commite0318673549a033ec026a5741f778a1e2b1b9337 (patch)
tree0e405aeebad162cee68a957bedc7ba45d6e93a95
parentf6777aa4acdfeb4d32ec00f34cdbadb6af8d9b7e (diff)
efl_ui_focus_manager_calc: fallback to use root if the focus stack is empty
Summary: this patch fixes T6664 Test Plan: 1. elementary_test -to focus 2. click Disable button 3. check whether you can move focus using key event. Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric Maniphest Tasks: T6664 Differential Revision: https://phab.enlightenment.org/D5813
-rw-r--r--src/lib/elementary/efl_ui_focus_manager_calc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/elementary/efl_ui_focus_manager_calc.c b/src/lib/elementary/efl_ui_focus_manager_calc.c
index 446c095120..7af455d708 100644
--- a/src/lib/elementary/efl_ui_focus_manager_calc.c
+++ b/src/lib/elementary/efl_ui_focus_manager_calc.c
@@ -1004,8 +1004,10 @@ _efl_ui_focus_manager_calc_unregister(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Manager_
1004 if (refocus) 1004 if (refocus)
1005 { 1005 {
1006 Node *n = eina_list_last_data_get(pd->focus_stack); 1006 Node *n = eina_list_last_data_get(pd->focus_stack);
1007 if (n) 1007 if (!n)
1008 efl_ui_focus_object_focus_set(n->focusable, EINA_TRUE); 1008 n = pd->root;
1009
1010 efl_ui_focus_object_focus_set(n->focusable, EINA_TRUE);
1009 } 1011 }
1010 1012
1011 //add all neighbors of the node to the dirty list 1013 //add all neighbors of the node to the dirty list