summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
authorNikolai Nechaev <nikolay_nechaev@mail.ru>2025-12-06 05:43:30 +0900
committerGitHub <noreply@github.com>2025-12-05 20:43:30 +0000
commit222dbe99d0d2d8a61f3b3202f8ef1794b0b081b7 (patch)
tree1c78deebddc7b7e8a777d6251bda73a886f796fc /src/managers/KeybindManager.cpp
parentebe74be75a86edd69340c44a910108c84ae38dce (diff)
keybinds: fix previous workspace remembering (#12399)
* swipe: Fix previous workspace remembering in workspace gesture Fixes a bug that previous workspace does not exist after swiping to a workspace * tests: Test that `workspace previous` works after workspace gesture * moveActiveToWorkspace: remember previous workspace unconditionally
Diffstat (limited to 'src/managers/KeybindManager.cpp')
-rw-r--r--src/managers/KeybindManager.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index a6d7a7e3..46f97d1f 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -1391,10 +1391,9 @@ SDispatchResult CKeybindManager::moveActiveToWorkspace(std::string args) {
return {.success = false, .error = "Not moving to workspace because it didn't change."};
}
- auto pWorkspace = g_pCompositor->getWorkspaceByID(WORKSPACEID);
- PHLMONITOR pMonitor = nullptr;
- const auto POLDWS = PWINDOW->m_workspace;
- static auto PALLOWWORKSPACECYCLES = CConfigValue<Hyprlang::INT>("binds:allow_workspace_cycles");
+ auto pWorkspace = g_pCompositor->getWorkspaceByID(WORKSPACEID);
+ PHLMONITOR pMonitor = nullptr;
+ const auto POLDWS = PWINDOW->m_workspace;
updateRelativeCursorCoords();
@@ -1419,8 +1418,7 @@ SDispatchResult CKeybindManager::moveActiveToWorkspace(std::string args) {
else if (POLDWS->m_isSpecialWorkspace)
POLDWS->m_monitor.lock()->setSpecialWorkspace(nullptr);
- if (*PALLOWWORKSPACECYCLES)
- pWorkspace->rememberPrevWorkspace(POLDWS);
+ pWorkspace->rememberPrevWorkspace(POLDWS);
pMonitor->changeWorkspace(pWorkspace);