diff options
author | Semun Lee <sm79.lee@samsung.com> | 2016-12-28 14:01:47 +0900 |
---|---|---|
committer | Semun Lee <sm79.lee@samsung.com> | 2016-12-28 14:01:47 +0900 |
commit | a6feb4b93fb290802d392a5bfd5998fefa2bdff9 (patch) | |
tree | fb29caded976279e2cf1b0812eefe4d3360d2886 | |
parent | ffa0de1e1fa558b8649f868d6fce9ac1bf93e591 (diff) | |
download | screen-connector-tizen_3.0.m2.tar.gz screen-connector-tizen_3.0.m2.tar.bz2 screen-connector-tizen_3.0.m2.zip |
Call visibility update in show,resize callbacksubmit/tizen_3.0/20161228.051438submit/tizen_3.0.m2/20170104.093749submit/tizen/20170105.005252accepted/tizen/wearable/20170105.223122accepted/tizen/tv/20170105.223102accepted/tizen/mobile/20170105.223032accepted/tizen/ivi/20170105.223142accepted/tizen/common/20170109.202237accepted/tizen/3.0/wearable/20161229.054102accepted/tizen/3.0/tv/20161229.054047accepted/tizen/3.0/mobile/20161229.054027accepted/tizen/3.0/ivi/20161229.054114accepted/tizen/3.0/common/20161229.112720accepted/tizen/3.0.m2/wearable/20170104.122951accepted/tizen/3.0.m2/tv/20170104.122628accepted/tizen/3.0.m2/mobile/20170104.122245tizen_3.0.m2accepted/tizen_3.0.m2_wearableaccepted/tizen_3.0.m2_tvaccepted/tizen_3.0.m2_mobile
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.c | 14 |
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; } |