aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-09-07 15:12:53 +0900
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-09-07 15:12:53 +0900
commit1022ddf831865956795c2bd71c07176ab7eedf66 (patch)
tree728f56ae56275ef8cd43bef7211bb517a51bb61c /src
parenta13afdbe2af9815f4b4c2073d30a0ebc40a296b7 (diff)
Modify getAppID
Change-Id: I3454b5013e59cd46be081dd30a295dda792deff8 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src')
-rw-r--r--src/applist.cpp15
-rw-r--r--src/applist.hpp4
-rw-r--r--src/window_manager.cpp2
3 files changed, 18 insertions, 3 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)
diff --git a/src/applist.hpp b/src/applist.hpp
index 98ce1b8..c31e4a2 100644
--- a/src/applist.hpp
+++ b/src/applist.hpp
@@ -57,9 +57,11 @@ class AppList
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);
diff --git a/src/window_manager.cpp b/src/window_manager.cpp
index 7ee9dbd..6b2ecf9 100644
--- a/src/window_manager.cpp
+++ b/src/window_manager.cpp
@@ -858,7 +858,7 @@ void WindowManager::startTransitionWrapper(vector<WMAction> &actions)
{
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)