From 1029304c80bf7f09dc2e44338ab34d4fd896860c Mon Sep 17 00:00:00 2001 From: Jaeho Lee Date: Sun, 3 Sep 2017 17:38:38 +0900 Subject: [PATCH] Fix black screen issue - The buffer for watch should be released after the new watch app was added Change-Id: Ie54e863cab495e672731fa3550eeb98237818a22 Signed-off-by: Junghoon Park --- watch-control/src/control.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/watch-control/src/control.c b/watch-control/src/control.c index 26be150..cb0e3fc 100644 --- a/watch-control/src/control.c +++ b/watch-control/src/control.c @@ -65,6 +65,7 @@ static int __default_width; static int __default_height; static screen_connector_toolkit_evas_h __toolkit; static screen_connector_toolkit_evas_h __rid_toolkit; +static screen_connector_toolkit_evas_h __tmp_toolkit; static Evas_Object *__win; static char *__watch_appid; @@ -394,6 +395,11 @@ static void __screen_connector_toolkit_evas_removed_cb(const char *appid, const __rid_toolkit = NULL; __is_bound = false; } + + if (__tmp_toolkit) { + screen_connector_toolkit_evas_remove(__tmp_toolkit); + __tmp_toolkit = NULL; + } } static void __screen_connector_toolkit_evas_updated_cb( @@ -916,6 +922,7 @@ static int __launch_signal_handler(const char *endpoint, char *viewer = NULL; char *pid_str = NULL; screen_connector_toolkit_evas_ops ops; + bool exist; bundle_get_str(envelope, AUL_K_WIDGET_VIEWER, &viewer); if (viewer == NULL) @@ -933,8 +940,15 @@ static int __launch_signal_handler(const char *endpoint, _D("cur appid(%s), new appid(%s), pid(%s)", __watch_appid, appid, pid_str); - if (__toolkit) + exist = screen_connector_toolkit_is_exist(appid, + SCREEN_CONNECTOR_SCREEEN_TYPE_WATCH); + + if (exist) { screen_connector_toolkit_evas_remove(__toolkit); + } else { + __tmp_toolkit = __toolkit; + _D("Old toolkit %p", __tmp_toolkit); + } ops.added_cb = __screen_connector_toolkit_evas_added_cb; ops.removed_cb = __screen_connector_toolkit_evas_removed_cb; -- 2.7.4