summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel@osg.samsung.com>2017-11-10 15:12:58 +0100
committerMarcel Hollerbach <marcel@osg.samsung.com>2017-11-11 20:21:56 +0100
commit4c4224df29a9908ebbdcce0e0a85e262bec4780a (patch)
tree3a3c7f0f2863c79242dbdf175a4f2e70aedc262d /src
parent42484606d0e1fbc5a36bf7a65ae7e5486e288508 (diff)
efl_ui_focus_composition: make sure to not unregister and register again
this fixes issues where a widget suddenly changes parent...
Diffstat (limited to 'src')
-rw-r--r--src/lib/elementary/efl_ui_focus_composition.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/elementary/efl_ui_focus_composition.c b/src/lib/elementary/efl_ui_focus_composition.c
index 5fa4950dde..222f5b771b 100644
--- a/src/lib/elementary/efl_ui_focus_composition.c
+++ b/src/lib/elementary/efl_ui_focus_composition.c
@@ -41,15 +41,23 @@ _state_apply(Eo *obj, Efl_Ui_Focus_Composition_Data *pd)
41 else if (pd->registered) 41 else if (pd->registered)
42 { 42 {
43 Eina_List *n; 43 Eina_List *n;
44 Eina_List *safed = NULL;
44 Efl_Ui_Focus_Object *o; 45 Efl_Ui_Focus_Object *o;
46
45 //remove all of them 47 //remove all of them
46 EINA_LIST_FREE(pd->registered_targets, o) 48 EINA_LIST_FREE(pd->registered_targets, o)
47 { 49 {
48 efl_ui_focus_manager_calc_unregister(manager, o); 50 if (!!eina_list_data_find(pd->register_target, o))
51 safed = eina_list_append(safed, o);
52 else
53 efl_ui_focus_manager_calc_unregister(manager, o);
49 } 54 }
55 pd->registered_targets = safed;
50 56
51 EINA_LIST_FOREACH(pd->register_target, n, o) 57 EINA_LIST_FOREACH(pd->register_target, n, o)
52 { 58 {
59 if (!!eina_list_data_find(pd->registered_targets, o)) continue;
60
53 if (!pd->logical) 61 if (!pd->logical)
54 efl_ui_focus_manager_calc_register(manager, o, obj, NULL); 62 efl_ui_focus_manager_calc_register(manager, o, obj, NULL);
55 else 63 else