billiob pushed a commit to branch master.

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

commit bed1532e19aa2607ee85b5e69402bb7e52e64275
Author: Boris Faure <bill...@gmail.com>
Date:   Tue Feb 2 23:34:54 2016 +0100

    remove callbacks early when pty exists
---
 src/bin/termio.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/src/bin/termio.c b/src/bin/termio.c
index 704c363..3526b6e 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -5278,6 +5278,7 @@ _smart_del(Evas_Object *obj)
                                        _smart_cb_mouse_wheel);
 
         evas_object_del(sd->event);
+        sd->event = NULL;
      }
    if (sd->self)
      {
@@ -5456,6 +5457,37 @@ _smart_pty_exited(void *data)
    Termio *sd = evas_object_smart_data_get(data);
 
    EINA_SAFETY_ON_NULL_RETURN(sd);
+
+   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);
+        sd->event = NULL;
+     }
+   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);
+     }
+
    term_close(sd->win, sd->self, EINA_TRUE);
 }
 

-- 


Reply via email to