billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=7b72052773c5e13cf2c2b55710efa4b716004775

commit 7b72052773c5e13cf2c2b55710efa4b716004775
Author: Boris Faure <bill...@gmail.com>
Date:   Tue Jun 2 23:23:56 2015 +0200

    remove callbacks when deleting termio
---
 src/bin/termio.c | 29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/src/bin/termio.c b/src/bin/termio.c
index b911526..36796c3 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -5127,7 +5127,34 @@ _smart_del(Evas_Object *obj)
         ecore_imf_context_del(sd->khdl.imf);
      }
    if (sd->cursor.obj) evas_object_del(sd->cursor.obj);
-   if (sd->event) evas_object_del(sd->event);
+   if (sd->event)
+     {
+        evas_object_event_callback_del(sd->event, EVAS_CALLBACK_MOUSE_DOWN,
+                                       _smart_cb_mouse_down);
+        evas_object_event_callback_del(sd->event, EVAS_CALLBACK_MOUSE_UP,
+                                       _smart_cb_mouse_up);
+        evas_object_event_callback_del(sd->event, EVAS_CALLBACK_MOUSE_MOVE,
+                                       _smart_cb_mouse_move);
+        evas_object_event_callback_del(sd->event, EVAS_CALLBACK_MOUSE_IN,
+                                       _smart_cb_mouse_in);
+        evas_object_event_callback_del(sd->event, EVAS_CALLBACK_MOUSE_OUT,
+                                       _smart_cb_mouse_out);
+        evas_object_event_callback_del(sd->event, EVAS_CALLBACK_MOUSE_WHEEL,
+                                       _smart_cb_mouse_wheel);
+
+        evas_object_del(sd->event);
+     }
+   if (sd->self)
+     {
+        evas_object_event_callback_del(sd->self, EVAS_CALLBACK_KEY_DOWN,
+                                       _smart_cb_key_down);
+        evas_object_event_callback_del(sd->self, EVAS_CALLBACK_KEY_UP,
+                                       _smart_cb_key_up);
+        evas_object_event_callback_del(sd->self, EVAS_CALLBACK_FOCUS_IN,
+                                       _smart_cb_focus_in);
+        evas_object_event_callback_del(sd->self, EVAS_CALLBACK_FOCUS_OUT,
+                                       _smart_cb_focus_out);
+     }
    if (sd->sel.top) evas_object_del(sd->sel.top);
    if (sd->sel.bottom) evas_object_del(sd->sel.bottom);
    if (sd->sel.theme) evas_object_del(sd->sel.theme);

-- 


Reply via email to