mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 20:45:59 +01:00
workspacerules: overwrite on existing
This commit is contained in:
parent
86ef85efae
commit
413a36a914
1 changed files with 6 additions and 1 deletions
|
@ -1125,7 +1125,12 @@ void CConfigManager::handleWorkspaceRules(const std::string& command, const std:
|
|||
wsRule.workspaceId = id;
|
||||
wsRule.workspaceName = name;
|
||||
|
||||
m_dWorkspaceRules.emplace_back(wsRule);
|
||||
const auto IT = std::find_if(m_dWorkspaceRules.begin(), m_dWorkspaceRules.end(), [&](const auto& other) { return other.workspaceString == wsRule.workspaceString; });
|
||||
|
||||
if (IT == m_dWorkspaceRules.end())
|
||||
m_dWorkspaceRules.emplace_back(wsRule);
|
||||
else
|
||||
*IT = wsRule;
|
||||
}
|
||||
|
||||
void CConfigManager::handleSubmap(const std::string& command, const std::string& submap) {
|
||||
|
|
Loading…
Reference in a new issue