diff options
| author | Vaxry <vaxry@vaxry.net> | 2025-10-27 21:29:35 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2025-10-27 21:29:35 +0000 |
| commit | 431325ff0c9bf76fdda5b68df6d60fa267846c92 (patch) | |
| tree | 3be23fd3cbe2aa2661295f3f73079098c2977ce4 /src/config/ConfigManager.cpp | |
| parent | 40831a90a0354af98e948ce8a4daf6440dc6c390 (diff) | |
config/rule: don't populate ID field for automatically id-managed workspaces
Diffstat (limited to 'src/config/ConfigManager.cpp')
| -rw-r--r-- | src/config/ConfigManager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 0e88fca3..3c6729c4 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -2396,12 +2396,12 @@ std::optional<std::string> CConfigManager::handleMonitor(const std::string& comm parser.parseVRR(ARGS[argno + 1]); argno++; } else if (ARGS[argno] == "workspace") { - const auto& [id, name] = getWorkspaceIDNameFromString(ARGS[argno + 1]); + const auto& [id, name, isAutoID] = getWorkspaceIDNameFromString(ARGS[argno + 1]); SWorkspaceRule wsRule; wsRule.monitor = parser.name(); wsRule.workspaceString = ARGS[argno + 1]; - wsRule.workspaceId = id; + wsRule.workspaceId = isAutoID ? WORKSPACE_INVALID : id; wsRule.workspaceName = name; m_workspaceRules.emplace_back(wsRule); @@ -2915,7 +2915,7 @@ std::optional<std::string> CConfigManager::handleWorkspaceRules(const std::strin auto first_ident = trim(value.substr(0, FIRST_DELIM)); - const auto& [id, name] = getWorkspaceIDNameFromString(first_ident); + const auto& [id, name, isAutoID] = getWorkspaceIDNameFromString(first_ident); auto rules = value.substr(FIRST_DELIM + 1); SWorkspaceRule wsRule; @@ -3015,8 +3015,8 @@ std::optional<std::string> CConfigManager::handleWorkspaceRules(const std::strin return R; } - wsRule.workspaceId = id; wsRule.workspaceName = name; + wsRule.workspaceId = isAutoID ? WORKSPACE_INVALID : id; const auto IT = std::ranges::find_if(m_workspaceRules, [&](const auto& other) { return other.workspaceString == wsRule.workspaceString; }); |
