_E("Fail screen_connector_toolkit_evas_add_by_rid");
return -1;
}
+
+ if (__rid_toolkit)
+ screen_connector_toolkit_evas_remove(__rid_toolkit);
+
__rid_toolkit = handle;
if (__watch_appid) {
char *viewer = NULL;
char *pid_str = NULL;
screen_connector_toolkit_evas_ops ops;
- bool exist;
bundle_get_str(envelope, AUL_K_WIDGET_VIEWER, &viewer);
if (viewer == NULL)
_D("cur appid(%s), new appid(%s), pid(%s)",
__watch_appid, appid, pid_str);
- exist = screen_connector_toolkit_is_exist(appid,
- SCREEN_CONNECTOR_SCREEEN_TYPE_WATCH);
- if (exist)
+ if (__toolkit)
screen_connector_toolkit_evas_remove(__toolkit);
ops.added_cb = __screen_connector_toolkit_evas_added_cb;
struct widget_info *widget_instance_info;
int w, h;
int target_pid = 0;
- screen_connector_toolkit_evas_h toolkit_h;
g_hash_table_iter_init(&iter, s_info.widget_table);
while (g_hash_table_iter_next(&iter, &key, &value)) {
ops.removed_cb = __screen_connector_toolkit_evas_removed_cb;
ops.updated_cb = __screen_connector_toolkit_evas_updated_cb;
- toolkit_h = screen_connector_toolkit_evas_add(&ops, widget_instance_info->instance_id,
- SCREEN_CONNECTOR_SCREEEN_TYPE_WIDGET, widget_instance_info);
- if (toolkit_h != NULL)
- widget_instance_info->toolkit_h = toolkit_h;
+ if (widget_instance_info->toolkit_h) {
+ screen_connector_toolkit_evas_remove(widget_instance_info->toolkit_h);
+ widget_instance_info->toolkit_h = NULL;
+ }
+
+ widget_instance_info->toolkit_h = screen_connector_toolkit_evas_add(&ops,
+ widget_instance_info->instance_id,
+ SCREEN_CONNECTOR_SCREEEN_TYPE_WIDGET,
+ widget_instance_info);
+
widget_instance_info->pid = widget_instance_launch(widget_instance_info->instance_id, widget_instance_info->content_info, w, h);
widget_instance_info->restart = false;
}
widget_size_type_e size_type;
screen_connector_toolkit_evas_ops ops;
struct pending_item *item;
- screen_connector_toolkit_evas_h toolkit_h;
evas_object_geometry_get(layout, &x, &y, &w, &h);
if (info->pid == 0) {
ops.added_cb = __screen_connector_toolkit_evas_added_cb;
ops.removed_cb = __screen_connector_toolkit_evas_removed_cb;
ops.updated_cb = __screen_connector_toolkit_evas_updated_cb;
- toolkit_h = screen_connector_toolkit_evas_add(&ops, info->instance_id, SCREEN_CONNECTOR_SCREEEN_TYPE_WIDGET, info);
- if (toolkit_h != NULL)
- info->toolkit_h = toolkit_h;
+ if (info->toolkit_h) {
+ screen_connector_toolkit_evas_remove(info->toolkit_h);
+ info->toolkit_h = NULL;
+ }
+
+ info->toolkit_h = screen_connector_toolkit_evas_add(&ops, info->instance_id, SCREEN_CONNECTOR_SCREEEN_TYPE_WIDGET, info);
+
+ LOGW("launch a widget instance: %s", info->instance_id);
info->pid = widget_instance_launch(info->instance_id, info->content_info, w, h);
if (info->pid < 0) {
struct widget_evas_event_info event_info;
{
struct widget_info *info;
screen_connector_toolkit_evas_ops ops;
- screen_connector_toolkit_evas_h toolkit_h;
if (!is_widget_feature_enabled()) {
set_last_result(WIDGET_ERROR_NOT_SUPPORTED);
ops.added_cb = __screen_connector_toolkit_evas_added_cb;
ops.removed_cb = __screen_connector_toolkit_evas_removed_cb;
ops.updated_cb = __screen_connector_toolkit_evas_updated_cb;
- toolkit_h = screen_connector_toolkit_evas_add(&ops, info->instance_id, SCREEN_CONNECTOR_SCREEEN_TYPE_WIDGET, info);
- if (toolkit_h)
- info->toolkit_h = toolkit_h;
+
+ if (info->toolkit_h) {
+ screen_connector_toolkit_evas_remove(info->toolkit_h);
+ info->toolkit_h = NULL;
+ }
+
+ info->toolkit_h = screen_connector_toolkit_evas_add(&ops, info->instance_id, SCREEN_CONNECTOR_SCREEEN_TYPE_WIDGET, info);
info->is_faulted = false;
info->pid = widget_instance_launch(info->instance_id, info->content_info, w, h);
if (info->pid < 0) {