summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-10-14 09:29:30 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-10-14 09:29:30 -0400
commit8218fb0e2030c49ed92acd7431f57ef41d367ab7 (patch)
tree2928c562403e5d0ada9417ce92b8e3be91a328c4
parente96d18b0462b77d051424d6ff510c5d5e3c3140b (diff)
eo: block "invalidate" event emission when there are no subscribers
Summary: this should be handled like the rest of eo internal events ref T8321 Depends on D10353 Reviewers: bu5hm4n, cedric Reviewed By: bu5hm4n, cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8321 Differential Revision: https://phab.enlightenment.org/D10354
-rw-r--r--src/lib/eo/eo_base_class.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index 782a57f52e..67deec898a 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -61,6 +61,7 @@ struct _Efl_Object_Data
61 unsigned short event_cb_efl_event_callback_del_count; 61 unsigned short event_cb_efl_event_callback_del_count;
62 unsigned short event_cb_efl_event_del_count; 62 unsigned short event_cb_efl_event_del_count;
63 unsigned short event_cb_efl_event_noref_count; 63 unsigned short event_cb_efl_event_noref_count;
64 unsigned short event_cb_efl_event_invalidate_count;
64 Eina_Bool callback_stopped : 1; 65 Eina_Bool callback_stopped : 1;
65 Eina_Bool need_cleaning : 1; 66 Eina_Bool need_cleaning : 1;
66 Eina_Bool allow_parent_unref : 1; // Allows unref to zero even with a parent 67 Eina_Bool allow_parent_unref : 1; // Allows unref to zero even with a parent
@@ -1228,6 +1229,8 @@ _special_event_count_inc(Eo *obj_id, Efl_Object_Data *pd, const Efl_Callback_Arr
1228 1229
1229 CB_COUNT_INC(pd->event_cb_efl_event_noref_count); 1230 CB_COUNT_INC(pd->event_cb_efl_event_noref_count);
1230 } 1231 }
1232 else if (it->desc == EFL_EVENT_INVALIDATE)
1233 CB_COUNT_INC(pd->event_cb_efl_event_invalidate_count);
1231 else if (it->desc == EFL_EVENT_DESTRUCT) 1234 else if (it->desc == EFL_EVENT_DESTRUCT)
1232 pd->has_destroyed_event_cb = EINA_TRUE; 1235 pd->has_destroyed_event_cb = EINA_TRUE;
1233 else if (it->desc == EFL_EVENT_OWNERSHIP_SHARED || it->desc == EFL_EVENT_OWNERSHIP_UNIQUE) 1236 else if (it->desc == EFL_EVENT_OWNERSHIP_SHARED || it->desc == EFL_EVENT_OWNERSHIP_UNIQUE)
@@ -1247,6 +1250,8 @@ _special_event_count_dec(Eo *obj_id, Efl_Object_Data *pd, const Efl_Callback_Arr
1247 CB_COUNT_DEC(pd->event_cb_efl_event_callback_del_count); 1250 CB_COUNT_DEC(pd->event_cb_efl_event_callback_del_count);
1248 else if (it->desc == EFL_EVENT_DEL) 1251 else if (it->desc == EFL_EVENT_DEL)
1249 CB_COUNT_DEC(pd->event_cb_efl_event_del_count); 1252 CB_COUNT_DEC(pd->event_cb_efl_event_del_count);
1253 else if (it->desc == EFL_EVENT_INVALIDATE)
1254 CB_COUNT_DEC(pd->event_cb_efl_event_invalidate_count);
1250 else if (it->desc == EFL_EVENT_NOREF) 1255 else if (it->desc == EFL_EVENT_NOREF)
1251 { 1256 {
1252 CB_COUNT_DEC(pd->event_cb_efl_event_noref_count); 1257 CB_COUNT_DEC(pd->event_cb_efl_event_noref_count);
@@ -1685,6 +1690,8 @@ _event_callback_call(Eo *obj_id, Efl_Object_Data *pd,
1685 (pd->event_cb_efl_event_callback_del_count == 0)) return EINA_FALSE; 1690 (pd->event_cb_efl_event_callback_del_count == 0)) return EINA_FALSE;
1686 else if ((desc == EFL_EVENT_DEL) && 1691 else if ((desc == EFL_EVENT_DEL) &&
1687 (pd->event_cb_efl_event_del_count == 0)) return EINA_FALSE; 1692 (pd->event_cb_efl_event_del_count == 0)) return EINA_FALSE;
1693 else if ((desc == EFL_EVENT_INVALIDATE) &&
1694 (pd->event_cb_efl_event_invalidate_count == 0)) return EINA_FALSE;
1688 else if ((desc == EFL_EVENT_NOREF) && 1695 else if ((desc == EFL_EVENT_NOREF) &&
1689 (pd->event_cb_efl_event_noref_count == 0)) return EINA_FALSE; 1696 (pd->event_cb_efl_event_noref_count == 0)) return EINA_FALSE;
1690 1697