aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorCactiChameleon9 <[email protected]>2022-11-21 23:30:26 +0000
committerGitHub <[email protected]>2022-11-21 23:30:26 +0000
commitf00b2fd50969e134f55a4a8de26bf7ffff4d41a1 (patch)
tree9bfb3c376e4eccb94f417dc4fa7ba6215b67a457 /src
parenteb86e7967f7d218a7c9412e484473fd578dbf64c (diff)
downloadHyprland-f00b2fd50969e134f55a4a8de26bf7ffff4d41a1.tar.gz
Hyprland-f00b2fd50969e134f55a4a8de26bf7ffff4d41a1.zip
Fix swiping on the first workspace going to the last (#1067)
Diffstat (limited to 'src')
-rw-r--r--src/managers/input/Swipe.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/managers/input/Swipe.cpp b/src/managers/input/Swipe.cpp
index 50763519..ab3a0418 100644
--- a/src/managers/input/Swipe.cpp
+++ b/src/managers/input/Swipe.cpp
@@ -188,7 +188,10 @@ void CInputManager::onSwipeUpdate(wlr_pointer_swipe_update_event* e) {
m_sActiveSwipe.delta = std::clamp(m_sActiveSwipe.delta, (double)-*PSWIPEDIST, (double)*PSWIPEDIST);
- if (((m_sActiveSwipe.pWorkspaceBegin->m_iID == workspaceIDLeft || m_sActiveSwipe.pWorkspaceBegin->m_iID == workspaceIDRight) && *PSWIPENEW && (m_sActiveSwipe.delta < 0)) || (m_sActiveSwipe.delta > 0 && g_pCompositor->getWindowsOnWorkspace(m_sActiveSwipe.pWorkspaceBegin->m_iID) == 0 && workspaceIDRight <= m_sActiveSwipe.pWorkspaceBegin->m_iID)) {
+ if ((m_sActiveSwipe.pWorkspaceBegin->m_iID == workspaceIDLeft && *PSWIPENEW && (m_sActiveSwipe.delta < 0)) ||
+ (m_sActiveSwipe.delta > 0 && g_pCompositor->getWindowsOnWorkspace(m_sActiveSwipe.pWorkspaceBegin->m_iID) == 0 && workspaceIDRight <= m_sActiveSwipe.pWorkspaceBegin->m_iID) ||
+ (m_sActiveSwipe.delta < 0 && m_sActiveSwipe.pWorkspaceBegin->m_iID <= workspaceIDLeft)) {
+
m_sActiveSwipe.delta = 0;
return;
}