X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fwm_client.cpp;h=e226791ad1e7bd873cbe571afc36ea14591820a2;hb=fb8bc594d8aafe8658502f15c137f85f592ac512;hp=6f1aa206288186ef79929fea635ff5c206dc0923;hpb=14be8c3bcc558d319f3324f06a5700b9155d2aa6;p=apps%2Fagl-service-windowmanager.git diff --git a/src/wm_client.cpp b/src/wm_client.cpp index 6f1aa20..e226791 100644 --- a/src/wm_client.cpp +++ b/src/wm_client.cpp @@ -84,12 +84,23 @@ unsigned WMClient::surfaceID(const string &role) const { if (0 == this->role2surface.count(role)) { - HMI_WARNING("wm", "invalid role"); + HMI_NOTICE("wm", "invalid role %s : appID : %s", role.c_str(), this->id.c_str()); return INVALID_SURFACE_ID; } return this->role2surface.at(role); } +std::string WMClient::role(unsigned surface) const +{ + for(const auto& [key, value] : this->role2surface) + { + if(value == surface){ + return key; + } + } + return std::string(""); +} + unsigned WMClient::layerID() const { return this->layer;