aboutsummaryrefslogtreecommitdiffstats
path: root/src/applist.cpp
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-06-12 18:59:17 +0900
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-06-12 18:59:17 +0900
commit7ab55d536e6985b9515c9f2d235a5ca6829df0fa (patch)
tree93e1446b33c2eef6e928a5bd33a25d0a2d9a0d73 /src/applist.cpp
parent1024e4747621cb4b45384afef671df6d15a9e2c0 (diff)
Output log if removing floating surface
Change-Id: Ia9e4593858260ce0893d7ec13ed396af0bbed9e7 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src/applist.cpp')
-rw-r--r--src/applist.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/applist.cpp b/src/applist.cpp
index 7249130..e855705 100644
--- a/src/applist.cpp
+++ b/src/applist.cpp
@@ -102,7 +102,7 @@ WMError AppList::popFloatingSurface(unsigned pid, unsigned *surface)
{
WMError ret = WMError::NO_ENTRY;
- auto rmv_begin = std::remove_if(this->floating_surfaces.begin(), this->floating_surfaces.end(),
+ auto fwd_itr = std::remove_if(this->floating_surfaces.begin(), this->floating_surfaces.end(),
[pid, surface, &ret](FloatingSurface x) {
if(pid == x.pid){
*surface = x.surface_id;
@@ -113,7 +113,11 @@ WMError AppList::popFloatingSurface(unsigned pid, unsigned *surface)
return false;
}
});
- this->floating_surfaces.erase(rmv_begin, this->floating_surfaces.end());
+ if (fwd_itr != this->floating_surfaces.cend())
+ {
+ HMI_INFO("wm", "pop floating surface: %d", *surface);
+ }
+ this->floating_surfaces.erase(fwd_itr, this->floating_surfaces.end());
return ret;
}
@@ -137,11 +141,14 @@ void AppList::addFloatingSurface(unsigned surface, unsigned pid)
void AppList::removeFloatingSurface(unsigned surface)
{
this->dumpFloatingSurfaces();
- auto rmv_begin = std::remove_if(this->floating_surfaces.begin(), this->floating_surfaces.end(),
+ auto fwd_itr = std::remove_if(this->floating_surfaces.begin(), this->floating_surfaces.end(),
[surface](FloatingSurface x) {
return x.surface_id == surface;
});
- this->floating_surfaces.erase(rmv_begin, this->floating_surfaces.end());
+ if(fwd_itr != this->floating_surfaces.cend()){
+ HMI_INFO("wm", "remove floating surface: %d", surface);
+ }
+ this->floating_surfaces.erase(fwd_itr, this->floating_surfaces.end());
}
WMError AppList::appendRole(const std::string &id, const std::string &role, unsigned surface)