summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-09-21 11:09:24 +0200
committerMike Blumenkrantz <zmike@samsung.com>2019-10-04 09:54:05 -0400
commit29c3aa5ba3a5b238afd181899e260767b5b0b703 (patch)
treec9913c4129274b07d39f4a219fc2e6c9d408df50
parent129337d997c1630600edb62958782c662e7fd189 (diff)
efl_ui_focus_managr_sub: fix a err message
with this commit there are a few errors less, for the case a object is destroyed while registered as a border element in the sub manager. This adds a few more callbacks to the list of callbacks, however, i could not messure a big performance impact. Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D10067
-rw-r--r--src/lib/elementary/efl_ui_focus_manager_sub.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.c b/src/lib/elementary/efl_ui_focus_manager_sub.c
index ee80ce40d2..7a2de74003 100644
--- a/src/lib/elementary/efl_ui_focus_manager_sub.c
+++ b/src/lib/elementary/efl_ui_focus_manager_sub.c
@@ -30,10 +30,21 @@ _set_a_without_b(Eina_List *a, Eina_List *b)
30} 30}
31 31
32static void 32static void
33_invalidate_cb(void *data, const Efl_Event *ev)
34{
35 MY_DATA(data, pd);
36
37 EINA_SAFETY_ON_NULL_RETURN(pd);
38
39 pd->current_border = eina_list_remove(pd->current_border, ev->object);
40}
41
42static void
33_register(Efl_Ui_Focus_Manager *obj, Efl_Ui_Focus_Manager *par_m, Efl_Ui_Focus_Object *node, Efl_Ui_Focus_Object *logical) 43_register(Efl_Ui_Focus_Manager *obj, Efl_Ui_Focus_Manager *par_m, Efl_Ui_Focus_Object *node, Efl_Ui_Focus_Object *logical)
34{ 44{
35 if (par_m) 45 if (par_m)
36 efl_ui_focus_manager_calc_register(par_m, node, logical, obj); 46 efl_ui_focus_manager_calc_register(par_m, node, logical, obj);
47 efl_event_callback_add(node, EFL_EVENT_INVALIDATE, _invalidate_cb, obj);
37} 48}
38 49
39static void 50static void
@@ -41,6 +52,7 @@ _unregister(Efl_Ui_Focus_Manager *obj EINA_UNUSED, Efl_Ui_Focus_Manager *par_m,
41{ 52{
42 if (par_m) 53 if (par_m)
43 efl_ui_focus_manager_calc_unregister(par_m, node); 54 efl_ui_focus_manager_calc_unregister(par_m, node);
55 efl_event_callback_del(node, EFL_EVENT_INVALIDATE, _invalidate_cb, obj);
44} 56}
45 57
46static void 58static void