summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel@osg.samsung.com>2018-04-11 10:33:19 +0200
committerMarcel Hollerbach <marcel@osg.samsung.com>2018-04-11 10:33:19 +0200
commitf4b70fc6cd2363733d74c580a9540dbb17239abd (patch)
tree4fab82d68cbf921d28bddb47a07c62debff0b504
parentba7e4d2168f8f32fa03d0f494f69df32cbdfbef7 (diff)
efl_ui_focus_manager_root_focus: maintain focus state over state eval
the rect is unregistered and registered again, if it was focused, still focus it.
-rw-r--r--src/lib/elementary/efl_ui_focus_manager_root_focus.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/elementary/efl_ui_focus_manager_root_focus.c b/src/lib/elementary/efl_ui_focus_manager_root_focus.c
index 3b21fb7729..ad2591bf56 100644
--- a/src/lib/elementary/efl_ui_focus_manager_root_focus.c
+++ b/src/lib/elementary/efl_ui_focus_manager_root_focus.c
@@ -31,10 +31,13 @@ static void
31_state_eval(Eo *obj, Efl_Ui_Focus_Manager_Root_Focus_Data *pd) 31_state_eval(Eo *obj, Efl_Ui_Focus_Manager_Root_Focus_Data *pd)
32{ 32{
33 Efl_Ui_Focus_Object *root; 33 Efl_Ui_Focus_Object *root;
34 Eina_Bool none_logical = EINA_FALSE; 34 Eina_Bool none_logical = EINA_FALSE, focused = EINA_FALSE;
35 35
36 if (pd->rect_registered) 36 if (pd->rect_registered)
37 efl_ui_focus_manager_calc_unregister(obj, pd->rect); 37 {
38 focused = efl_ui_focus_object_focus_get(pd->rect);
39 efl_ui_focus_manager_calc_unregister(obj, pd->rect);
40 }
38 41
39 root = efl_ui_focus_manager_root_get(obj); 42 root = efl_ui_focus_manager_root_get(obj);
40 none_logical = !!efl_ui_focus_manager_request_subchild(obj, root); 43 none_logical = !!efl_ui_focus_manager_request_subchild(obj, root);
@@ -45,6 +48,10 @@ _state_eval(Eo *obj, Efl_Ui_Focus_Manager_Root_Focus_Data *pd)
45 { 48 {
46 efl_ui_focus_manager_calc_register(obj, pd->rect, pd->root, NULL); 49 efl_ui_focus_manager_calc_register(obj, pd->rect, pd->root, NULL);
47 pd->rect_registered = EINA_TRUE; 50 pd->rect_registered = EINA_TRUE;
51
52 if (focused)
53 efl_ui_focus_manager_focus_set(obj, pd->rect);
54
48 } 55 }
49} 56}
50 57