summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/managers/KeybindManager.cpp10
-rw-r--r--src/managers/input/UnifiedWorkspaceSwipeGesture.cpp4
2 files changed, 6 insertions, 8 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);
diff --git a/src/managers/input/UnifiedWorkspaceSwipeGesture.cpp b/src/managers/input/UnifiedWorkspaceSwipeGesture.cpp
index 6dae1e63..68ee5b9b 100644
--- a/src/managers/input/UnifiedWorkspaceSwipeGesture.cpp
+++ b/src/managers/input/UnifiedWorkspaceSwipeGesture.cpp
@@ -292,7 +292,7 @@ void CUnifiedWorkspaceSwipeGesture::end() {
pSwitchedTo = PWORKSPACER;
}
- m_workspaceBegin->rememberPrevWorkspace(pSwitchedTo);
+ pSwitchedTo->rememberPrevWorkspace(m_workspaceBegin);
g_pHyprRenderer->damageMonitor(m_monitor.lock());
@@ -311,4 +311,4 @@ void CUnifiedWorkspaceSwipeGesture::end() {
for (auto const& ls : Desktop::focusState()->monitor()->m_layerSurfaceLayers[2]) {
*ls->m_alpha = pSwitchedTo->m_hasFullscreenWindow && pSwitchedTo->m_fullscreenMode == FSMODE_FULLSCREEN ? 0.f : 1.f;
}
-} \ No newline at end of file
+}