From b9da444f98dd5075dcda05932c47c732a5ae230f Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Tue, 25 Sep 2018 13:30:07 +0900 Subject: Remove service surface in WMClient if service surface vanishes Change-Id: I3c12a8313c6aaa411001fec260d09106f897664e Signed-off-by: Kazumasa Mitsunari --- src/wm_client.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/wm_client.cpp b/src/wm_client.cpp index 356cd6f..f2ad7be 100644 --- a/src/wm_client.cpp +++ b/src/wm_client.cpp @@ -141,6 +141,19 @@ bool WMClient::removeSurfaceIfExist(unsigned surface) this->surface = INVALID_SURFACE_ID; ret = true; } + else + { + for(auto &x : this->service2surfaces) + { + if(x.second = surface) + { + ret = true; + string key = x.first; + this->service2surfaces.erase(key); + this->service2supplier.erase(key); + } + } + } return ret; } -- cgit 1.2.3-korg