summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/elementary/efl_ui_focus_composition.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/lib/elementary/efl_ui_focus_composition.c b/src/lib/elementary/efl_ui_focus_composition.c
index a35e71f..57c45ad 100644
--- a/src/lib/elementary/efl_ui_focus_composition.c
+++ b/src/lib/elementary/efl_ui_focus_composition.c
@@ -15,7 +15,7 @@ typedef struct {
15 Eina_List *order, *targets_ordered; 15 Eina_List *order, *targets_ordered;
16 Eina_List *register_target, *registered_targets; 16 Eina_List *register_target, *registered_targets;
17 Eina_List *adapters; 17 Eina_List *adapters;
18 Efl_Ui_Focus_Manager *registered, *custom_manager; 18 Efl_Ui_Focus_Manager *registered, *custom_manager, *old_manager;
19 Eina_Bool dirty; 19 Eina_Bool dirty;
20 Eina_Bool logical; 20 Eina_Bool logical;
21} Efl_Ui_Focus_Composition_Data; 21} Efl_Ui_Focus_Composition_Data;
@@ -39,6 +39,7 @@ _state_apply(Eo *obj, Efl_Ui_Focus_Composition_Data *pd)
39 Eina_List *safed = NULL; 39 Eina_List *safed = NULL;
40 Efl_Ui_Focus_Object *o; 40 Efl_Ui_Focus_Object *o;
41 41
42 pd->old_manager = manager;
42 //remove all of them 43 //remove all of them
43 EINA_LIST_FREE(pd->registered_targets, o) 44 EINA_LIST_FREE(pd->registered_targets, o)
44 { 45 {
@@ -75,6 +76,21 @@ _state_apply(Eo *obj, Efl_Ui_Focus_Composition_Data *pd)
75 76
76 efl_ui_focus_manager_calc_update_order(manager, obj, eina_list_clone(pd->targets_ordered)); 77 efl_ui_focus_manager_calc_update_order(manager, obj, eina_list_clone(pd->targets_ordered));
77 } 78 }
79 else
80 {
81 Efl_Ui_Focus_Object *o;
82
83 EINA_LIST_FREE(pd->registered_targets, o)
84 {
85 efl_ui_focus_manager_calc_unregister(pd->old_manager, o);
86
87 if (efl_isa(o, EFL_UI_FOCUS_COMPOSITION_ADAPTER_CLASS))
88 {
89 efl_ui_focus_composition_adapter_focus_manager_parent_set(o, NULL);
90 efl_ui_focus_composition_adapter_focus_manager_object_set(o, NULL);
91 }
92 }
93 }
78} 94}
79static void 95static void
80_del(void *data, const Efl_Event *ev) 96_del(void *data, const Efl_Event *ev)