From e049192b600ef84a417fe26cf6bdc644bd658c1c Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Fri, 16 Jun 2017 15:54:05 +0900 Subject: [PATCH] Remove evas callback from destroyed surface tbm 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 --- .../src/screen_connector_toolkit_evas.c | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c index 7a6182f..2fb66c2 100644 --- a/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c +++ b/screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c @@ -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); -- 2.7.4