cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f1aa23805a1b7931a024054de344508148b2a616

commit f1aa23805a1b7931a024054de344508148b2a616
Author: Cedric BAIL <[email protected]>
Date:   Thu Mar 8 14:59:12 2018 -0800

    eo: when an object is reused, reset the invalidate flag.
---
 src/lib/eo/eo.c            | 1 +
 src/lib/eo/eo_base_class.c | 7 +++++++
 src/lib/eo/eo_private.h    | 1 +
 3 files changed, 9 insertions(+)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index f2626acca5..243c8929ce 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -1022,6 +1022,7 @@ efl_reuse(const Eo *eo_id)
    efl_object_override(obj, NULL);
    if (!efl_parent_get(obj))
      _efl_object_parent_sink_set(obj, EINA_FALSE);
+   _efl_object_reuse(obj);
 
 #ifdef EO_DEBUG
    _eo_log_obj_ref_op(_obj, EO_REF_OP_REUSE);
diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index fe6da95b72..25881f423f 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -613,6 +613,13 @@ _efl_object_parent_sink_set(Eo *obj, Eina_Bool sink)
    pd->parent_sunk = sink;
 }
 
+void
+_efl_object_reuse(Eo *obj)
+{
+   Efl_Object_Data *pd = efl_data_scope_get(obj, EFL_OBJECT_CLASS);
+   pd->invalidate = EINA_FALSE;
+}
+
 EOLIAN static void
 _efl_object_parent_set(Eo *obj, Efl_Object_Data *pd, Eo *parent_id)
 {
diff --git a/src/lib/eo/eo_private.h b/src/lib/eo/eo_private.h
index 38f8c9eb03..5e0e829249 100644
--- a/src/lib/eo/eo_private.h
+++ b/src/lib/eo/eo_private.h
@@ -218,6 +218,7 @@ typedef struct
 void _eo_log_obj_report(const Eo_Id id, int log_level, const char *func_name, 
const char *file, int line);
 
 void _efl_object_parent_sink_set(Eo *obj, Eina_Bool sink);
+void _efl_object_reuse(Eo *obj);
 
 static inline
 Eo *_eo_header_id_get(const Eo_Header *header)

-- 


Reply via email to