Remove evas callback from destroyed surface tbm 73/134373/1 submit/tizen_3.0/20170620.015924
authorHyunho Kang <hhstark.kang@samsung.com>
Fri, 16 Jun 2017 06:54:05 +0000 (15:54 +0900)
committerHyunho Kang <hhstark.kang@samsung.com>
Fri, 16 Jun 2017 06:56:43 +0000 (15:56 +0900)
Destroyed surface's tbm buffer can be remained in viewer application so
we need to remove every callback from destroyed surface's tbm buffer.

Change-Id: I0487f697ae506079790c333875cc8f7885452087
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c

index 7a6182f..2fb66c2 100644 (file)
@@ -68,6 +68,15 @@ static GHashTable *__type_table = NULL;
 static Ecore_Event_Handler *__visibility_listener;
 static int __delayed_resuming_time;
 
+static void __rs_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void __rs_cb_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void __rs_cb_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void __rs_cb_mouse_wheel(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void __rs_cb_show(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void __rs_cb_hide(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void __rs_cb_resize(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void __obj_update_visibility(void *data, Evas *e, Evas_Object *obj, void *event_info);
+
 static void __destroy_type_h(gpointer data)
 {
        screen_connector_type_evas_h type_h = (screen_connector_type_evas_h)data;
@@ -145,6 +154,41 @@ static void __destroy_toolkit_evas_h(gpointer data)
                return;
 
        if (toolkit_evas_h->img_tbm != NULL) {
+
+               evas_object_event_callback_del(
+                               toolkit_evas_h->img_tbm,
+                               EVAS_CALLBACK_MOUSE_DOWN,
+                               __rs_cb_mouse_down);
+               evas_object_event_callback_del(
+                               toolkit_evas_h->img_tbm,
+                               EVAS_CALLBACK_MOUSE_UP,
+                               __rs_cb_mouse_up);
+               evas_object_event_callback_del(
+                               toolkit_evas_h->img_tbm,
+                               EVAS_CALLBACK_MOUSE_MOVE,
+                               __rs_cb_mouse_move);
+               evas_object_event_callback_del(
+                               toolkit_evas_h->img_tbm,
+                               EVAS_CALLBACK_MOUSE_WHEEL,
+                               __rs_cb_mouse_wheel);
+               evas_object_event_callback_del(
+                               toolkit_evas_h->img_tbm,
+                               EVAS_CALLBACK_SHOW,
+                               __rs_cb_show);
+               evas_object_event_callback_del(
+                               toolkit_evas_h->img_tbm,
+                               EVAS_CALLBACK_HIDE,
+                               __rs_cb_hide);
+               evas_object_event_callback_del(
+                               toolkit_evas_h->img_tbm,
+                               EVAS_CALLBACK_RESIZE,
+                               __rs_cb_resize);
+
+               evas_object_event_callback_del(
+                               toolkit_evas_h->img_tbm,
+                               EVAS_CALLBACK_MOVE,
+                               __obj_update_visibility);
+
                plug_id = evas_object_data_del(toolkit_evas_h->img_tbm, "___PLUGID");
                if (plug_id)
                        free(plug_id);