aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormemchr <[email protected]>2023-09-11 22:39:24 +0000
committerGitHub <[email protected]>2023-09-11 23:39:24 +0100
commitbc41d7ec8515723d79cc921454a739d65db69467 (patch)
treee5b69d17a2ce8f52faae1dafc4817d3e85a3ca53
parentdf51c45d7f9e4e280b959f790f7cde6c88b9b451 (diff)
downloadHyprland-bc41d7ec8515723d79cc921454a739d65db69467.tar.gz
Hyprland-bc41d7ec8515723d79cc921454a739d65db69467.zip
fix: inconsistent behaviour where last workspace was not saved (#3261)
-rw-r--r--src/Compositor.cpp1
-rw-r--r--src/managers/input/Swipe.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index 7cdaf54b..e1fb60cb 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -877,6 +877,7 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) {
// This is to fix incorrect feedback on the focus history.
const auto PWORKSPACE = getWorkspaceByID(pWindow->m_iWorkspaceID);
PWORKSPACE->m_pLastFocusedWindow = pWindow;
+ PWORKSPACE->rememberPrevWorkspace(getWorkspaceByID(m_pLastMonitor->activeWorkspace));
const auto PMONITOR = getMonitorFromID(PWORKSPACE->m_iMonitorID);
PMONITOR->changeWorkspace(PWORKSPACE, false, true);
// changeworkspace already calls focusWindow
diff --git a/src/managers/input/Swipe.cpp b/src/managers/input/Swipe.cpp
index c1aa42f3..ebed67cd 100644
--- a/src/managers/input/Swipe.cpp
+++ b/src/managers/input/Swipe.cpp
@@ -165,6 +165,7 @@ void CInputManager::onSwipeEnd(wlr_pointer_swipe_end_event* e) {
pSwitchedTo = PWORKSPACER;
}
+ m_sActiveSwipe.pWorkspaceBegin->rememberPrevWorkspace(pSwitchedTo);
g_pHyprRenderer->damageMonitor(m_sActiveSwipe.pMonitor);