screen_connector_toolkit_evas_h screen_connector_toolkit_evas_add_with_win(screen_connector_toolkit_evas_ops *ops, char *id,
screen_connector_screen_type_e type, Evas_Object *win, void *data);
int screen_connector_toolkit_evas_is_visible(Evas_Object *obj, bool *is_visible);
-
-visibility_type screen_connector_toolkit_evas_auto_visibility(
- screen_connector_toolkit_evas_h h);
-int screen_connector_toolkit_evas_set_changed_event_filter(
- screen_connector_toolkit_evas_h toolkit_evas_h,
++visibility_type screen_connector_toolkit_evas_auto_visibility(screen_connector_toolkit_evas_h h);
++int screen_connector_toolkit_evas_set_changed_event_filter(screen_connector_toolkit_evas_h toolkit_evas_h,
+ screen_connector_evas_changed_event_filter_type type);
/**
* @}
type_h = g_hash_table_lookup(__type_table, GINT_TO_POINTER(type));
if (type_h == NULL) {
-
type_h = (screen_connector_type_evas_h)calloc(1, sizeof(struct _screen_connector_type_evas_h));
- type_h->toolkit_table = g_hash_table_new_full(g_str_hash, g_str_equal, free, __destroy_toolkit_evas_h);
+ if (type_h == NULL) {
+ LOGE("Out of memory");
+ return -1;
+ }
+
+ g_hash_table_insert(__type_table, GINT_TO_POINTER(type), type_h);
+
+ type_h->toolkit_table = g_hash_table_new_full(g_str_hash, g_str_equal, free, NULL);
if (!type_h->toolkit_table) {
LOGE("failed to create table");
- free(type_h);
return -1;
}
- g_hash_table_insert(__type_table, GINT_TO_POINTER(type), type_h);
}
type_h->viewer_win = win;
if (!surface)
return -1;
- if (__delayed_resuming_time == 0) {
+ if (__delayed_resuming_time == 0 ||
- toolkit_evas_h->screen_type == SCREEN_CONNECTOR_SCREEEN_TYPE_WATCH) {
++ toolkit_evas_h->screen_type == SCREEN_CONNECTOR_SCREEN_TYPE_WATCH) {
+ if (obscured == TIZEN_REMOTE_SURFACE_VISIBILITY_TYPE_INVISIBLE)
+ tizen_remote_surface_transfer_touch_cancel(surface);
+
+ LOGI("normal resume");
tizen_remote_surface_transfer_visibility(surface, obscured);
return 0;
c_buf_info = g_hash_table_lookup(__cur_buffer_table, toolkit_evas_h->cur_buffer);
if (c_buf_info == NULL) {
c_buf_info = (cur_buffer_info_h)calloc(1, sizeof(struct _cur_buffer_info_h));
- c_buf_info->cur_buffer = toolkit_evas_h->cur_buffer;
- __cur_buffer_info_ref(c_buf_info);
- g_hash_table_insert(__cur_buffer_table, toolkit_evas_h->cur_buffer, c_buf_info);
+ if (c_buf_info == NULL) {
+ LOGE("Out of memory");
+ } else {
+ c_buf_info->cur_buffer = toolkit_evas_h->cur_buffer;
+ __cur_buffer_info_ref(c_buf_info);
+ g_hash_table_insert(__cur_buffer_table, toolkit_evas_h->cur_buffer, c_buf_info);
+ }
} else {
- __cur_buffer_info_ref(c_buf_info);
+ if (!duplicate_buffer)
+ __cur_buffer_info_ref(c_buf_info);
}
if (is_added) {
return;
}
- toolkit_table = toolkit_evas_h->type_h->toolkit_table;
+
++ toolkit_table = toolkit_evas_h->type_h->toolkit_table;
if (toolkit_evas_h->img_tbm != NULL) {
plug_id = evas_object_data_del(toolkit_evas_h->img_tbm, "___PLUGID");
if (plug_id)
else
type = VISIBILITY_TYPE_UNOBSCURED;
-
+ __set_window_visibility_info(toolkit_evas_h, ev->win, type);
+ type = VISIBILITY_TYPE_FULLY_OBSCURED;
+ iter = toolkit_evas_h->viewer_visibility_list;
+ while (iter != NULL) {
+ visibility_h = (viewer_visibility_h)iter->data;
+ if (visibility_h->visibility == VISIBILITY_TYPE_UNKNOWN) {
+ LOGE("viewer not ready");
+ return;
+ } else if (visibility_h->visibility ==
+ VISIBILITY_TYPE_UNOBSCURED) {
+ type = VISIBILITY_TYPE_UNOBSCURED;
+ break;
+ }
+ iter = g_list_next(iter);
+ }
+
+ LOGW("set visibility to %d", type);
ret = __set_visibility(toolkit_evas_h, type);
+ toolkit_evas_h->auto_visibility = type;
if (ret == -1)
LOGE("failed to set object visibility set %p to %d", toolkit_evas_h->img_tbm, type);
}