From: Kyuho Jo Date: Thu, 16 Jun 2016 22:21:23 +0000 (-0700) Subject: Merge "Fix defects from off-line code review" into tizen X-Git-Tag: accepted/tizen/common/20160623.154523~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d097ef3439787e9f90efeb6ff840fbee64cc5b32;p=platform%2Fcore%2Fappfw%2Fwidget-viewer.git Merge "Fix defects from off-line code review" into tizen --- d097ef3439787e9f90efeb6ff840fbee64cc5b32 diff --cc widget_viewer_evas/src/widget_viewer_evas.c index 5788100,aedfe86..a081b95 --- a/widget_viewer_evas/src/widget_viewer_evas.c +++ b/widget_viewer_evas/src/widget_viewer_evas.c @@@ -533,18 -529,11 +532,17 @@@ static void del_cb(void *data, Evas *e widget_instance_destroy(info->widget_id, info->instance_id); evas_object_data_del(layout, WIDGET_INFO_TAG); + g_hash_table_remove(s_info.widget_table, info->instance_id); info->layout = NULL; + if (info->event_queue) { + g_queue_free(info->event_queue); + info->event_queue = NULL; + } + free(info->widget_id); free(info->instance_id); - free(info->content_info); - bundle_free(info->b); + bundle_free(info->content_info_bundle); free(info); } @@@ -1283,13 -1302,13 +1318,14 @@@ EAPI int widget_viewer_evas_freeze_visi { struct widget_info *info; int ret = 0; + Evas_Object *pepper_obj; - if (!is_widget_feature_enabled()) + if (!is_widget_feature_enabled()) { return WIDGET_ERROR_NOT_SUPPORTED; + } if (!s_info.initialized) { - ErrPrint("widget viewer evas is not initialized\n"); + ErrPrint("widget viewer evas is not initialized"); return WIDGET_ERROR_FAULT; } @@@ -1304,23 -1323,17 +1340,23 @@@ return WIDGET_ERROR_INVALID_PARAMETER; } + pepper_obj = elm_object_part_content_get(widget, "pepper,widget"); + if (!pepper_obj) { + ErrPrint("widget object is invalid\n"); + return WIDGET_ERROR_INVALID_PARAMETER; + } + if (status == WIDGET_VISIBILITY_STATUS_SHOW_FIXED) { - ret = widget_instance_resume(info->widget_id, info->instance_id); + ret = _compositor_freeze_visibility(pepper_obj, VISIBILITY_TYPE_UNOBSCURED); if (ret < 0) { - ErrPrint("Fail to resume the widget(%p):(%d)\n", widget, ret); + ErrPrint("Fail to resume the widget(%p):(%d)", widget, ret); return ret; } info->visibility_freeze = status; } else if (status == WIDGET_VISIBILITY_STATUS_HIDE_FIXED) { - ret = widget_instance_pause(info->widget_id, info->instance_id); + ret = _compositor_freeze_visibility(pepper_obj, VISIBILITY_TYPE_FULLY_OBSCURED); if (ret < 0) { - ErrPrint("Fail to pause the widget(%p):(%d)\n", widget, ret); + ErrPrint("Fail to pause the widget(%p):(%d)", widget, ret); return ret; } info->visibility_freeze = status;