diff options
author | 2018-08-31 11:42:20 +0900 | |
---|---|---|
committer | 2018-08-31 11:42:20 +0900 | |
commit | b73c8310f2ca06b356135ef3a1b17e5cb6e2ec5d (patch) | |
tree | ddc470c02619b28a26b2dfb3940bd54cef77efd2 /src | |
parent | 9f4fb3b34b4b8152c4355b735c5b7a3825086c4b (diff) |
Update wm_client
Change-Id: I76854f8a452c582d9bb3f795f6e779106304ad7a
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src')
-rw-r--r-- | src/wm_client.cpp | 10 | ||||
-rw-r--r-- | src/wm_client.hpp | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/wm_client.cpp b/src/wm_client.cpp index 7245549..3bc2d31 100644 --- a/src/wm_client.cpp +++ b/src/wm_client.cpp @@ -114,6 +114,11 @@ std::string WMClient::role(unsigned surface) const return std::string(""); } +string WMClient::role() const +{ + return this->main_role; +} + unsigned WMClient::layerID() const { return this->layer; @@ -167,6 +172,11 @@ bool WMClient::addSurface(const string &role, unsigned surface) bool WMClient::removeSurfaceIfExist(unsigned surface) { bool ret = false; + if(surface == this->surface) + { + this->surface = INVALID_SURFACE_ID; + return true; + } for (auto &x : this->role2surface) { if (surface == x.second) diff --git a/src/wm_client.hpp b/src/wm_client.hpp index 369f084..c78d6f9 100644 --- a/src/wm_client.hpp +++ b/src/wm_client.hpp @@ -53,6 +53,7 @@ class WMClient unsigned surfaceID() const; std::vector<unsigned> renderOrder() const; std::string role(unsigned surface) const; + std::string role() const; const std::vector<std::string> &roles() const; void setRole(const std::string& role); void appendRole(const std::string& role); @@ -71,6 +72,7 @@ class WMClient std::string id; unsigned layer; std::string wm_layer_name; + std::string main_role; std::string area; unsigned surface; // currently, main application has only one surface. std::vector<std::string> role_list; |