From 431325ff0c9bf76fdda5b68df6d60fa267846c92 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 27 Oct 2025 21:29:35 +0000 Subject: config/rule: don't populate ID field for automatically id-managed workspaces --- src/config/ConfigManager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/config/ConfigManager.cpp') 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 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 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 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; }); -- cgit v1.2.3