aboutsummaryrefslogtreecommitdiffstats
path: root/src/applist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/applist.cpp')
-rw-r--r--src/applist.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/applist.cpp b/src/applist.cpp
index e27bd03..922a89e 100644
--- a/src/applist.cpp
+++ b/src/applist.cpp
@@ -167,7 +167,7 @@ int AppList::countClient() const
* @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)
@@ -178,6 +178,19 @@ string AppList::getAppID(unsigned surface, const string& role, bool* found) cons
}
}
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)