summaryrefslogtreecommitdiff
path: root/src/config/ConfigManager.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2022-09-24 13:42:18 +0100
committervaxerski <vaxry@vaxry.net>2022-09-24 13:42:18 +0100
commit73dbacd16d16d8a58d9c12e2a3ebcf4538faf55b (patch)
treec32116026cea09e5baf2067f695220558ffdb9db /src/config/ConfigManager.cpp
parent65fb0cf0f62f23d34334275ac9ae1741f72a1e10 (diff)
overwrite wsbind rules on existing
Diffstat (limited to 'src/config/ConfigManager.cpp')
-rw-r--r--src/config/ConfigManager.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index 6f90c691..83f56ae1 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -939,6 +939,13 @@ void CConfigManager::handleBindWS(const std::string& command, const std::string&
const auto WS = value.substr(0, value.find_first_of(','));
const auto MON = value.substr(value.find_first_of(',') + 1);
+ const auto FOUND = std::find_if(boundWorkspaces.begin(), boundWorkspaces.end(), [&](const auto& other) { return other.first == WS; });
+
+ if (FOUND != boundWorkspaces.end()) {
+ FOUND->second = MON;
+ return;
+ }
+
boundWorkspaces.push_back({WS, MON});
}