* @return AppID
* @attention If AppID is not found, param found will be false.
*/
-string AppList::getAppID(unsigned surface, const string& role, bool* found) const
+/* string AppList::getAppID(unsigned surface, const string& role, bool* found) const
{
*found = false;
for (const auto &x : this->app2client)
}
}
return string("");
+} */
+
+string AppList::getAppID(unsigned surface, bool* found) const
+{
+ *found = false;
+ for (const auto &x : this->app2client)
+ {
+ if(x.second->surfaceID() == surface){
+ *found = true;
+ return x.second->appID();
+ }
+ }
+ return string("");
}
WMError AppList::popFloatingSurface(unsigned pid, unsigned *surface)
int countClient() const;
std::shared_ptr<WMClient> lookUpClient(const std::string &appid);
void removeSurface(unsigned surface);
- std::string getAppID(unsigned surface, const std::string &role, bool *found) const;
+ //std::string getAppID(unsigned surface, const std::string &role, bool *found) const;
+ std::string getAppID(unsigned surface, bool* found) const;
WMError appendRole(const std::string &appid, const std::string &role);
+
// Floating surface
void addFloatingClient(const std::string &appid, unsigned layer, const std::string &role);
void addFloatingSurface(const std::string &appid, unsigned surface, unsigned pid);
{
bool found;
auto const &surface_id = this->id_alloc.lookup(act.role);
- string appid = g_app_list.getAppID(*surface_id, act.role, &found);
+ string appid = g_app_list.getAppID(*surface_id, &found);
if (!found)
{
if (TaskVisible::INVISIBLE == act.visible)