diff options
Diffstat (limited to 'src/applist.cpp')
-rw-r--r-- | src/applist.cpp | 17 |
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; } |