summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-10-10 13:49:45 -0400
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-10-29 16:17:48 +0100
commit2477dfaf59413a608194840756c9280d241ce76e (patch)
treef0b9d68f91eb7f18c05241bdc720e3fb4a6554ec
parent9878a0cad45a46d7bd85a07be759f0e9ccd6fd74 (diff)
edje: selectively inhibit content,changed events when changing swallowed parts
ref T8321 Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D10508
-rw-r--r--src/lib/edje/edje_private.h1
-rw-r--r--src/lib/edje/edje_smart.c8
-rw-r--r--src/lib/edje/edje_util.c3
3 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 6893dd3..b752d09 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -1803,6 +1803,7 @@ struct _Edje
1803 Eina_Bool canvas_animator : 1; 1803 Eina_Bool canvas_animator : 1;
1804 Eina_Bool has_state_clip : 1; 1804 Eina_Bool has_state_clip : 1;
1805 Eina_Bool has_recalc_event_cb : 1; 1805 Eina_Bool has_recalc_event_cb : 1;
1806 Eina_Bool has_content_change_event_cb : 1;
1806}; 1807};
1807 1808
1808struct _Edje_Calc_Params_Map 1809struct _Edje_Calc_Params_Map
diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c
index ff023f8..f8d42d9 100644
--- a/src/lib/edje/edje_smart.c
+++ b/src/lib/edje/edje_smart.c
@@ -608,6 +608,10 @@ _efl_canvas_layout_efl_object_event_callback_priority_add(Eo *obj, Edje *pd, con
608 { 608 {
609 pd->has_recalc_event_cb = EINA_TRUE; 609 pd->has_recalc_event_cb = EINA_TRUE;
610 } 610 }
611 else if (desc == EFL_CONTENT_EVENT_CONTENT_CHANGED)
612 {
613 pd->has_content_change_event_cb = EINA_TRUE;
614 }
611 615
612 return efl_event_callback_priority_add(efl_super(obj, MY_CLASS), desc, priority, func, user_data); 616 return efl_event_callback_priority_add(efl_super(obj, MY_CLASS), desc, priority, func, user_data);
613} 617}
@@ -621,6 +625,10 @@ _efl_canvas_layout_efl_object_event_callback_array_priority_add(Eo *obj, Edje *p
621 { 625 {
622 pd->has_recalc_event_cb = EINA_TRUE; 626 pd->has_recalc_event_cb = EINA_TRUE;
623 } 627 }
628 else if (array[i].desc == EFL_CONTENT_EVENT_CONTENT_CHANGED)
629 {
630 pd->has_content_change_event_cb = EINA_TRUE;
631 }
624 } 632 }
625 return efl_event_callback_array_priority_add(efl_super(obj, MY_CLASS), array, priority, user_data); 633 return efl_event_callback_array_priority_add(efl_super(obj, MY_CLASS), array, priority, user_data);
626} 634}
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index 450015f..38de6f3 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -3088,7 +3088,8 @@ _edje_efl_content_content_set(Edje *ed, const char *part, Efl_Gfx_Entity *obj_sw
3088 eud->u.swallow.child = obj_swallow; 3088 eud->u.swallow.child = obj_swallow;
3089 } 3089 }
3090 } 3090 }
3091 efl_event_callback_call(ed->obj, EFL_CONTENT_EVENT_CONTENT_CHANGED, obj_swallow); 3091 if (ed->has_content_change_event_cb)
3092 efl_event_callback_call(ed->obj, EFL_CONTENT_EVENT_CONTENT_CHANGED, obj_swallow);
3092 return EINA_TRUE; 3093 return EINA_TRUE;
3093} 3094}
3094 3095