diff options
| author | vaxerski <vaxry@vaxry.net> | 2023-12-23 15:49:42 +0100 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2023-12-23 15:49:42 +0100 |
| commit | cc0516a9aeb36d116f1de06965c827dc91e12073 (patch) | |
| tree | 3be60cebc1573538df3b50bfb3bf068ccb67c01a /src/config/ConfigManager.cpp | |
| parent | 6c8e0f9863d86755d7931a9d6ad920b2049cf6a6 (diff) | |
windowrules: minor fixes to onworkspace
fixes #4227
Diffstat (limited to 'src/config/ConfigManager.cpp')
| -rw-r--r-- | src/config/ConfigManager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |
