summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSemun Lee <sm79.lee@samsung.com>2016-12-28 14:01:47 +0900
committerSemun Lee <sm79.lee@samsung.com>2016-12-28 14:01:47 +0900
commita6feb4b93fb290802d392a5bfd5998fefa2bdff9 (patch)
treefb29caded976279e2cf1b0812eefe4d3360d2886
parentffa0de1e1fa558b8649f868d6fce9ac1bf93e591 (diff)
downloadscreen-connector-tizen_3.0.m2.tar.gz
screen-connector-tizen_3.0.m2.tar.bz2
screen-connector-tizen_3.0.m2.zip
We need to update initial visibility value for the object when it is shown or resized. If we skip it, the display server sets its own visibility state value for the object as invisible one. Change-Id: I75782a77f1cabadafabf560965e34e634816d702 Signed-off-by: Semun Lee <sm79.lee@samsung.com>
-rw-r--r--screen_connector_watcher_evas/src/screen_connector_watcher_evas.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/screen_connector_watcher_evas/src/screen_connector_watcher_evas.c b/screen_connector_watcher_evas/src/screen_connector_watcher_evas.c
index e560334..9cb94d4 100644
--- a/screen_connector_watcher_evas/src/screen_connector_watcher_evas.c
+++ b/screen_connector_watcher_evas/src/screen_connector_watcher_evas.c
@@ -136,7 +136,7 @@ static int __set_visibility(screen_connector_watcher_evas_h watcher_evas_h, visi
return 0;
}
-static void __obj_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+static void __obj_update_visibility(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
screen_connector_watcher_evas_h watcher_evas_h = (screen_connector_watcher_evas_h)data;
@@ -281,6 +281,7 @@ static void __rs_cb_mouse_wheel(void *data, Evas *e, Evas_Object *obj, void *eve
static void __rs_cb_show(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
LOGD("show");
+ __obj_update_visibility(data, e, obj, event_info);
}
static void __rs_cb_hide(void *data, Evas *e, Evas_Object *obj, void *event_info)
@@ -288,6 +289,12 @@ static void __rs_cb_hide(void *data, Evas *e, Evas_Object *obj, void *event_info
LOGD("hide");
}
+static void __rs_cb_resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+ LOGD("resize");
+ __obj_update_visibility(data, e, obj, event_info);
+}
+
static void __watcher_change_cb(struct tizen_remote_surface *trs, uint32_t type, struct wl_buffer *tbm,
int32_t img_file_fd, uint32_t img_file_size, uint32_t time, struct wl_array *keys, void *data)
{
@@ -332,6 +339,9 @@ static void __watcher_change_cb(struct tizen_remote_surface *trs, uint32_t type,
evas_object_event_callback_add(watcher_evas_h->img_tbm,
EVAS_CALLBACK_HIDE,
__rs_cb_hide, watcher_evas_h);
+ evas_object_event_callback_add(watcher_evas_h->img_tbm,
+ EVAS_CALLBACK_RESIZE,
+ __rs_cb_resize, watcher_evas_h);
/* Store watcher_evas_h */
g_hash_table_insert(__watcher_tbl, watcher_evas_h->img_tbm, watcher_evas_h);
@@ -340,7 +350,7 @@ static void __watcher_change_cb(struct tizen_remote_surface *trs, uint32_t type,
snprintf(plug_id, sizeof(plug_id), "%s:%d", appid, pid);
evas_object_data_set(watcher_evas_h->img_tbm, "___PLUGID", strdup(plug_id));
evas_object_event_callback_add(watcher_evas_h->img_tbm,
- EVAS_CALLBACK_MOVE, __obj_move_cb, watcher_evas_h);
+ EVAS_CALLBACK_MOVE, __obj_update_visibility, watcher_evas_h);
is_added = true;
}