Do not use delayed resume for watch 62/145162/1
authorHyunho Kang <hhstark.kang@samsung.com>
Mon, 21 Aug 2017 11:43:15 +0000 (20:43 +0900)
committerHyunho Kang <hhstark.kang@samsung.com>
Mon, 21 Aug 2017 11:43:38 +0000 (20:43 +0900)
Change-Id: I4d3019fa937c25f58efaced3fc13376782e1e995
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
screen_connector_watcher_evas/src/screen_connector_toolkit_evas.c

index 7eda3cd..2140a6c 100644 (file)
@@ -68,6 +68,7 @@ struct _screen_connector_toolkit_evas_h {
        GList *viewer_visibility_list;
        visibility_type auto_visibility;
        int bind_win_id;
+       screen_connector_screen_type_e screen_type;
        void *data;
 };
 
@@ -415,6 +416,7 @@ static gboolean __resuming_timeout_cb(gpointer user_data)
 
        surface = screen_connector_toolkit_get_trs(toolkit_evas_h->toolkit_h);
        if (surface) {
+               LOGI("delayed resume");
                tizen_remote_surface_transfer_visibility(surface,
                                TIZEN_REMOTE_SURFACE_VISIBILITY_TYPE_VISIBLE);
        }
@@ -450,10 +452,12 @@ static int __set_visibility(screen_connector_toolkit_evas_h toolkit_evas_h, visi
        if (!surface)
                return -1;
 
-       if (__delayed_resuming_time == 0) {
+       if (__delayed_resuming_time == 0 ||
+               toolkit_evas_h->screen_type == SCREEN_CONNECTOR_SCREEEN_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;
@@ -1046,6 +1050,7 @@ EXPORT_API screen_connector_toolkit_evas_h screen_connector_toolkit_evas_add_wit
        handle->data = data;
        handle->type_h = type_h;
        handle->toolkit_h = screen_connector_toolkit_add_with_surface(&toolkit_ops, id, type, surface, handle);
+       handle->screen_type = type;
 
        return handle;
 }
@@ -1092,6 +1097,7 @@ EXPORT_API screen_connector_toolkit_evas_h screen_connector_toolkit_evas_add(scr
        handle->data = data;
        handle->type_h = type_h;
        handle->toolkit_h = screen_connector_toolkit_add(&toolkit_ops, id, type, handle);
+       handle->screen_type = type;
 
        return handle;
 }
@@ -1369,6 +1375,7 @@ EXPORT_API screen_connector_toolkit_evas_h screen_connector_toolkit_evas_add_by_
        handle->ops = evas_ops;
        handle->data = data;
        handle->type_h = type_h;
+       handle->screen_type = type;
 
        uuid_generate(u);
        uuid_unparse(u, uuid);