diff options
| author | devil-may-c0de <122350426+devil-may-c0de@users.noreply.github.com> | 2023-01-16 20:04:10 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-16 21:04:10 +0100 |
| commit | 6a56d1e4d035824ea5dc94180994017346c5c067 (patch) | |
| tree | 1c36efc6241c871f252476cf388604c7d7d37de0 /src/managers/KeybindManager.cpp | |
| parent | 589046ecf74965a8e22a9891290f4b289c60a334 (diff) | |
change placement of isSwitchingToPrevious (#1388)
fixes #1218, but doesn't break functionality of allow_workspace_cycles.
Diffstat (limited to 'src/managers/KeybindManager.cpp')
| -rw-r--r-- | src/managers/KeybindManager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 3546d028..1fe4b729 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -669,13 +669,13 @@ void CKeybindManager::changeworkspace(std::string args) { else workspaceName = std::to_string(workspaceToChangeTo); - isSwitchingToPrevious = true; - // If the previous workspace ID isn't reset, cycles can form when continually going // to the previous workspace again and again. static auto* const PALLOWWORKSPACECYCLES = &g_pConfigManager->getConfigValuePtr("binds:allow_workspace_cycles")->intValue; if (!*PALLOWWORKSPACECYCLES) PCURRENTWORKSPACE->m_iPrevWorkspaceID = -1; + else + isSwitchingToPrevious = true; } } else { workspaceToChangeTo = getWorkspaceIDFromString(args, workspaceName); @@ -702,13 +702,13 @@ void CKeybindManager::changeworkspace(std::string args) { else workspaceName = std::to_string(workspaceToChangeTo); - isSwitchingToPrevious = true; - // If the previous workspace ID isn't reset, cycles can form when continually going // to the previous workspace again and again. static auto* const PALLOWWORKSPACECYCLES = &g_pConfigManager->getConfigValuePtr("binds:allow_workspace_cycles")->intValue; if (!*PALLOWWORKSPACECYCLES) PCURRENTWORKSPACE->m_iPrevWorkspaceID = -1; + else + isSwitchingToPrevious = true; } else if (PCURRENTWORKSPACE && PCURRENTWORKSPACE->m_iID == workspaceToChangeTo && !internal) return; |
