diff options
author | scorpion-26 <[email protected]> | 2024-01-11 19:22:40 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-01-11 19:22:40 +0100 |
commit | babb9c07b045e21b5549cdcc3096d677e9db35b3 (patch) | |
tree | d65ff97cafba9fd0eea6cb94ab9c4565f0d92dfa | |
parent | 6b92144f15117f9f7d93fe9867d6ec849d9abce1 (diff) | |
download | Hyprland-babb9c07b045e21b5549cdcc3096d677e9db35b3.tar.gz Hyprland-babb9c07b045e21b5549cdcc3096d677e9db35b3.zip |
swipe: Prevent hiding current workspace when swiping (#4417)
When workspace_swipe_use_r is enabled, swiping from WS 1 to a non-empty WS 2 would
hide WS 1 (Similar effect to issue #4076). This is caused by a faulty
check which doesn't consider, that workspaceIDLeft could be the current
workspace.
This bug is only a problem for r, because m wraps around on WS 1 m-1, whereas r stays on WS 1.
-rw-r--r-- | src/managers/input/Swipe.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/managers/input/Swipe.cpp b/src/managers/input/Swipe.cpp index f345e4f5..38ec8aa2 100644 --- a/src/managers/input/Swipe.cpp +++ b/src/managers/input/Swipe.cpp @@ -265,7 +265,7 @@ void CInputManager::onSwipeUpdate(wlr_pointer_swipe_update_event* e) { PWORKSPACE->m_bForceRendering = true; PWORKSPACE->m_fAlpha.setValueAndWarp(1.f); - if (workspaceIDLeft != workspaceIDRight) { + if (workspaceIDLeft != workspaceIDRight && workspaceIDRight != m_sActiveSwipe.pWorkspaceBegin->m_iID) { const auto PWORKSPACER = g_pCompositor->getWorkspaceByID(workspaceIDRight); if (PWORKSPACER) { @@ -305,7 +305,7 @@ void CInputManager::onSwipeUpdate(wlr_pointer_swipe_update_event* e) { PWORKSPACE->m_bForceRendering = true; PWORKSPACE->m_fAlpha.setValueAndWarp(1.f); - if (workspaceIDLeft != workspaceIDRight) { + if (workspaceIDLeft != workspaceIDRight && workspaceIDLeft != m_sActiveSwipe.pWorkspaceBegin->m_iID) { const auto PWORKSPACEL = g_pCompositor->getWorkspaceByID(workspaceIDLeft); if (PWORKSPACEL) { |