bool is_created;
GQueue *pending_queue;
bool is_faulted;
+ screen_connector_toolkit_evas_h toolkit_h;
};
static void __flush_event_queue(struct widget_info *info);
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;
- screen_connector_toolkit_evas_add(&ops, widget_instance_info->instance_id,
+ 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;
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;
- screen_connector_toolkit_evas_add(&ops, info->instance_id, SCREEN_CONNECTOR_SCREEEN_TYPE_WIDGET, info);
+ 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;
info->pid = widget_instance_launch(info->instance_id, info->content_info, w, h);
if (info->pid < 0) {
if (info->content_info)
free(info->content_info);
+
+ screen_connector_toolkit_evas_remove(info->toolkit_h);
+
free(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;
- screen_connector_toolkit_evas_add(&ops, info->instance_id, SCREEN_CONNECTOR_SCREEEN_TYPE_WIDGET, info);
+ 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;
info->is_faulted = false;
info->pid = widget_instance_launch(info->instance_id, info->content_info, w, h);
if (info->pid < 0) {