From: Jaeho Lee Date: Sun, 3 Sep 2017 08:38:38 +0000 (+0900) Subject: Fix black screen issue X-Git-Tag: accepted/tizen/3.0/common/20171013.190637~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F68%2F147268%2F2;p=platform%2Fcore%2Fappfw%2Fwidget-viewer.git 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 --- 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;