aboutsummaryrefslogtreecommitdiffstats
path: root/src/applist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/applist.cpp')
-rw-r--r--src/applist.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/applist.cpp b/src/applist.cpp
index c083c20..b06dee8 100644
--- a/src/applist.cpp
+++ b/src/applist.cpp
@@ -65,7 +65,7 @@ AppList::~AppList() {}
* @attention This function should be called once for the app
* Caller should take care not to be called more than once.
*/
-void AppList::addClient(const std::string &appid, unsigned layer, unsigned surface, const std::string &role)
+void AppList::addClient(const string &appid, unsigned layer, unsigned surface, const string &role)
{
std::lock_guard<std::mutex> lock(this->mtx);
shared_ptr<WMClient> client = std::make_shared<WMClient>(appid, layer, surface, role);
@@ -197,19 +197,19 @@ WMError AppList::popFloatingSurface(unsigned pid, unsigned *surface)
// =================== Floating(Temporary) surface/client API ===================
-WMError AppList::popFloatingSurface(const std::string &appid, unsigned *surface)
+WMError AppList::popFloatingSurface(const string &appid, unsigned *surface)
{
HMI_ERROR("wm", "This function is not implemented");
return WMError::SUCCESS;
}
-void AppList::addFloatingClient(const std::string &appid, unsigned layer, const std::string &role)
+void AppList::addFloatingClient(const string &appid, unsigned layer, const string &role)
{
}
-void AppList::addFloatingSurface(unsigned surface, unsigned pid)
+void AppList::addFloatingSurface(const string &appid, unsigned surface, unsigned pid)
{
- struct FloatingSurface fsurface{surface, pid};
+ struct FloatingSurface fsurface{appid, surface, pid};
this->floating_surfaces.push_back(fsurface);
this->dumpFloatingSurfaces();
}
@@ -217,17 +217,18 @@ void AppList::addFloatingSurface(unsigned surface, unsigned pid)
void AppList::removeFloatingSurface(unsigned surface)
{
this->dumpFloatingSurfaces();
- auto fwd_itr = std::remove_if(this->floating_surfaces.begin(), this->floating_surfaces.end(),
- [surface](FloatingSurface x) {
- return x.surface_id == surface;
- });
+ auto fwd_itr = std::remove_if(
+ this->floating_surfaces.begin(), this->floating_surfaces.end(),
+ [surface](FloatingSurface x) {
+ return x.surface_id == surface;
+ });
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)
+WMError AppList::appendRole(const string &id, const string &role, unsigned surface)
{
WMError wm_err = WMError::NO_ENTRY;
if (this->contains(id))