From 92cbe39df7b53208e15bea19e523570be915cf1e Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Tue, 11 Sep 2018 13:56:24 +0900 Subject: Add terminate process for layer_control Change-Id: I583bfa1da8fa88e15b13417de15d7d2b9e79f7f2 Signed-off-by: Kazumasa Mitsunari --- src/window_manager.cpp | 2 ++ src/wm_layer_control.cpp | 8 ++++++++ src/wm_layer_control.hpp | 1 + 3 files changed, 11 insertions(+) diff --git a/src/window_manager.cpp b/src/window_manager.cpp index 41fc5c8..e4083d5 100644 --- a/src/window_manager.cpp +++ b/src/window_manager.cpp @@ -821,6 +821,8 @@ void WindowManager::surface_properties(unsigned surface_id, unsigned pid) void WindowManager::removeClient(const string &appid) { HMI_DEBUG("Remove clinet %s from list", appid.c_str()); + auto client = g_app_list.lookUpClient(appid); + this->lc->terminateApp(client); g_app_list.removeClient(appid); } diff --git a/src/wm_layer_control.cpp b/src/wm_layer_control.cpp index 9756d5e..30c37f9 100644 --- a/src/wm_layer_control.cpp +++ b/src/wm_layer_control.cpp @@ -428,6 +428,14 @@ WMError LayerControl::visibilityChange(const WMAction& action) return ret; } +void LayerControl::terminateApp(const shared_ptr client) +{ + for(auto& l : this->wm_layers) + { + l->terminateApp(client->layerID()); + } +} + void LayerControl::dispatchCreateEvent(ilmObjectType object, unsigned id, bool created) { if (ILM_SURFACE == object) diff --git a/src/wm_layer_control.hpp b/src/wm_layer_control.hpp index 3bf219a..7cccfa0 100644 --- a/src/wm_layer_control.hpp +++ b/src/wm_layer_control.hpp @@ -80,6 +80,7 @@ class LayerControl void undoUpdate(); WMError layoutChange(const WMAction& action); WMError visibilityChange(const WMAction &action); + void terminateApp(const std::shared_ptr client); // Don't use this function. void dispatchCreateEvent(ilmObjectType object, unsigned id, bool created); -- cgit 1.2.3-korg