From cc0516a9aeb36d116f1de06965c827dc91e12073 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Sat, 23 Dec 2023 15:49:42 +0100 Subject: windowrules: minor fixes to onworkspace fixes #4227 --- src/config/ConfigManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/config/ConfigManager.cpp') diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 477c3986..7e4ce769 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -1038,9 +1038,9 @@ void CConfigManager::handleWindowRuleV2(const std::string& command, const std::s // find workspacepos that isn't onworkspacepos size_t WORKSPACEPOS = std::string::npos; - size_t currentPos = 0; + size_t currentPos = VALUE.find("workspace:"); while (currentPos != std::string::npos) { - if (currentPos > 0 && VALUE[currentPos - 1] != 'n') { + if (currentPos == 0 || VALUE[currentPos - 1] != 'n') { WORKSPACEPOS = currentPos; break; } -- cgit v1.2.3