summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2015-03-10 00:04:28 +0200
committerKai Huuhko <kai.huuhko@gmail.com>2015-03-10 00:04:28 +0200
commita11fadc82df6155c3cefde17effffe683ac72c59 (patch)
tree6a6a7836e8b0138b67a44c92b39b2a5c9a0e5681
parentd416425f5130263c9cee26672c76bbf9c2fd09ea (diff)
Evas.SmartObject: Handle object deletion in a saner way
Evas free event gets called last, we free resources there so that the SO callbacks can call with a valid object reference.
-rw-r--r--efl/evas/efl.evas_object_smart.pxi11
1 files changed, 2 insertions, 9 deletions
diff --git a/efl/evas/efl.evas_object_smart.pxi b/efl/evas/efl.evas_object_smart.pxi
index 4cc7af5..988dd09 100644
--- a/efl/evas/efl.evas_object_smart.pxi
+++ b/efl/evas/efl.evas_object_smart.pxi
@@ -49,13 +49,6 @@ cdef void _smart_object_delete(Evas_Object *o) with gil:
49 except Exception: 49 except Exception:
50 traceback.print_exc() 50 traceback.print_exc()
51 51
52 # eo_do(self.obj,
53 # eo_event_callback_del(EO_EV_DEL, _eo_event_del_cb, <const void *>self))
54 eo_do(o, eo_key_data_del("python-eo"))
55 #evas_object_smart_data_set(obj.obj, NULL)
56 obj.obj = NULL
57 Py_DECREF(obj)
58
59 52
60cdef void _smart_object_move(Evas_Object *o, Evas_Coord x, Evas_Coord y) with gil: 53cdef void _smart_object_move(Evas_Object *o, Evas_Coord x, Evas_Coord y) with gil:
61 cdef: 54 cdef:
@@ -617,8 +610,8 @@ cdef class SmartObject(Object):
617 610
618 self.obj = obj 611 self.obj = obj
619 eo_do(self.obj, eo_key_data_set("python-eo", <void *>self, NULL)) 612 eo_do(self.obj, eo_key_data_set("python-eo", <void *>self, NULL))
620 # eo_do(self.obj, 613 evas_object_event_callback_add(obj, EVAS_CALLBACK_FREE,
621 # eo_event_callback_add(EO_EV_DEL, _eo_event_del_cb, <const void *>self)) 614 obj_free_cb, <void *>self)
622 Py_INCREF(self) 615 Py_INCREF(self)
623 616
624 return 1 617 return 1