From 6920861ba50ce106e16dfab40fdd86dafa09f7af Mon Sep 17 00:00:00 2001 From: Taehyub Kim Date: Thu, 24 Nov 2016 15:37:52 +0900 Subject: [PATCH] elm_cnp: skip other process's send/receive event when ECORE_WL_EVENT_SELECTION_DATA_READY and ECORE_WL_EVENT_SELECTION_SOURCE_SEND callbacks are added by other packages, matched event callbacks in elm_cnp can be called in unexpected time. Change-Id: I6248b697a2e873814a940f51373f72bb40cb1f4b --- src/lib/elm_cnp.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c index 98a7636..8313aae 100644 --- a/src/lib/elm_cnp.c +++ b/src/lib/elm_cnp.c @@ -3233,6 +3233,11 @@ _wl_selection_send(void *data, int type EINA_UNUSED, void *event) buf = data_ret; cnp_debug("write: %s", buf); + //TIZEN_ONLY(20161124): skip other process's send event + if (buf == NULL) + return ECORE_CALLBACK_PASS_ON; + // + while (len_written < len_ret) { ret = write(ev->fd, buf, len_remained); @@ -3244,6 +3249,12 @@ _wl_selection_send(void *data, int type EINA_UNUSED, void *event) free(data_ret); close(ev->fd); + + //TIZEN_ONLY(20161124): skip other process's send event + ELM_SAFE_FREE(sel->selbuf, free); + sel->buflen = 0; + // + return ECORE_CALLBACK_PASS_ON; } @@ -3393,6 +3404,10 @@ end: /* FIXME: Send Finished ?? */ } + //TIZEN_ONLY(20161124): skip other process's receive event + sel->requestwidget = NULL; + // + return ECORE_CALLBACK_PASS_ON; } // -- 2.7.4