From: Hwankyu Jhun Date: Fri, 17 Mar 2017 07:53:20 +0000 (+0900) Subject: Send create aborted event to the widget viewer X-Git-Tag: accepted/tizen/common/20170320.173612~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=fcbfa76f54caaff86e2ff9648d420f1338854af8;p=platform%2Fcore%2Fappfw%2Fappcore-widget.git Send create aborted event to the widget viewer Requires: - https://review.tizen.org/gerrit/119553 Change-Id: Iaac8a02534fd72381a270aa00e00de59756559f0 Signed-off-by: Hwankyu Jhun --- diff --git a/src/widget_app.c b/src/widget_app.c index 6cedfa8..e25fdd1 100755 --- a/src/widget_app.c +++ b/src/widget_app.c @@ -476,7 +476,17 @@ static int __instance_create(widget_class_h handle, const char *id, const char * ret = handle->ops.create(wc, content_info, w, h, handle->user_data); if (ret < 0) { _W("Create callback resturns error(%d)", ret); - /* TODO send abort */ + ret = __send_update_status(handle->classid, wc->id, + WIDGET_INSTANCE_EVENT_CREATE_ABORTED, NULL); + _widget_app_remove_context(wc); + if (wc->id) + free(wc->id); + if (wc->content) + free(wc->content); + free(wc); + + if (_widget_app_get_contexts() == NULL && !exit_called) + widget_app_exit(); } else { ret = __send_update_status(handle->classid, wc->id, WIDGET_INSTANCE_EVENT_CREATE, NULL);