aboutsummaryrefslogtreecommitdiffstats
path: root/src/applist.cpp
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-08-27 19:15:30 +0900
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-08-27 19:17:24 +0900
commite5295c77d4c436212265edeca7f9a4818a5133e6 (patch)
tree79b38046d79add27328816d97be94baff6e303c5 /src/applist.cpp
parenta5106227c3c9ddbe2b07fbc2ecfc4e2ae1e4de74 (diff)
Update wm_client and applist
Change-Id: I76a58f431b894f2db1a8864f620c48311807befc Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src/applist.cpp')
-rw-r--r--src/applist.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/applist.cpp b/src/applist.cpp
index 391a3ce..644e41e 100644
--- a/src/applist.cpp
+++ b/src/applist.cpp
@@ -73,6 +73,14 @@ void AppList::addClient(const string &appid, unsigned layer, unsigned surface, c
this->clientDump();
}
+void AppList::addClient(const string &appid, unsigned layer, const string& layer_name, unsigned surface, const string &role)
+{
+ std::lock_guard<std::mutex> lock(this->mtx);
+ shared_ptr<WMClient> client = std::make_shared<WMClient>(appid, layer, layer_name, surface, role);
+ this->app2client[appid] = client;
+ this->clientDump();
+}
+
/**
* Remove WMClient from the list
*
@@ -228,16 +236,15 @@ void AppList::removeFloatingSurface(unsigned surface)
this->floating_surfaces.erase(fwd_itr, this->floating_surfaces.end());
}
-WMError AppList::appendRole(const string &id, const string &role, unsigned surface)
+WMError AppList::appendRole(const string &id, const string &role)
{
WMError wm_err = WMError::NO_ENTRY;
- HMI_ERROR("This function is disabled");
- /* if (this->contains(id))
+ if (this->contains(id))
{
auto x = this->lookUpClient(id);
- x->addSurface(role, surface);
+ x->appendRole(role);
wm_err = WMError::SUCCESS;
- } */
+ }
return wm_err;
}