summaryrefslogtreecommitdiff
path: root/src/desktop/Workspace.cpp
diff options
context:
space:
mode:
authorthejch <66577496+thejch@users.noreply.github.com>2024-04-12 17:55:17 -0700
committerGitHub <noreply@github.com>2024-04-13 01:55:17 +0100
commit582d6233c802327fea45a14d146e7cbab5fe4b1e (patch)
tree7fd21c2d12cb9435ed4b569f5f0f55e87f78f4cc /src/desktop/Workspace.cpp
parent34396f55a283e5fe332ed7e1b8fd814840808ae5 (diff)
workspace: fix workspace name selector returning true early (#5571)
Diffstat (limited to 'src/desktop/Workspace.cpp')
-rw-r--r--src/desktop/Workspace.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/desktop/Workspace.cpp b/src/desktop/Workspace.cpp
index 70a0f370..5789e54f 100644
--- a/src/desktop/Workspace.cpp
+++ b/src/desktop/Workspace.cpp
@@ -334,10 +334,10 @@ bool CWorkspace::matchesStaticSelector(const std::string& selector_) {
prop = prop.substr(2, prop.length() - 3);
- if (prop.starts_with("s:"))
- return m_szName.starts_with(prop.substr(2));
- if (prop.starts_with("e:"))
- return m_szName.ends_with(prop.substr(2));
+ if (prop.starts_with("s:") && !m_szName.starts_with(prop.substr(2)))
+ return false;
+ if (prop.starts_with("e:") && !m_szName.ends_with(prop.substr(2)))
+ return false;
const auto WANTSNAMED = configStringToInt(prop);