aboutsummaryrefslogtreecommitdiffstats
path: root/src/wm_client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wm_client.cpp')
-rw-r--r--src/wm_client.cpp10
1 files changed, 10 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)