aboutsummaryrefslogtreecommitdiffstats
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
parent1024e4747621cb4b45384afef671df6d15a9e2c0 (diff)
Output log if removing floating surface
Change-Id: Ia9e4593858260ce0893d7ec13ed396af0bbed9e7 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
-rw-r--r--src/app.cpp1
-rw-r--r--src/applist.cpp15
2 files changed, 11 insertions, 5 deletions
diff --git a/src/app.cpp b/src/app.cpp
index 3b42a85..4cc4b3d 100644
--- a/src/app.cpp
+++ b/src/app.cpp
@@ -894,7 +894,6 @@ void App::api_activate_surface(char const *appid, char const *drawing_name, char
reply("role should be set with surface");
return;
}
- g_app_list.dumpFloatingSurfaces();
g_app_list.removeFloatingSurface(client->surfaceID(role));
/*
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)