summaryrefslogtreecommitdiff
path: root/src/managers/input/Swipe.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-07-07 13:57:26 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-07-07 13:57:26 +0200
commit22c4ecf496b5ef6485a4cf1713a689c4c6cb10b2 (patch)
tree60e0981741797f0c80d00fbff7de624bb9648551 /src/managers/input/Swipe.cpp
parent3f43f94dc48f7d545609673f4474551ba215812a (diff)
fixed swiping with one ws
Diffstat (limited to 'src/managers/input/Swipe.cpp')
-rw-r--r--src/managers/input/Swipe.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/managers/input/Swipe.cpp b/src/managers/input/Swipe.cpp
index df88782f..692b7fda 100644
--- a/src/managers/input/Swipe.cpp
+++ b/src/managers/input/Swipe.cpp
@@ -96,7 +96,7 @@ void CInputManager::onSwipeUpdate(wlr_pointer_swipe_update_event* e) {
auto workspaceIDLeft = getWorkspaceIDFromString("m-1", wsname);
auto workspaceIDRight = getWorkspaceIDFromString("m+1", wsname);
- if (workspaceIDLeft == INT_MAX || workspaceIDRight == INT_MAX)
+ if (workspaceIDLeft == INT_MAX || workspaceIDRight == INT_MAX || workspaceIDLeft == m_sActiveSwipe.pWorkspaceBegin->m_iID)
return;
m_sActiveSwipe.delta = std::clamp(m_sActiveSwipe.delta, (double)-*PSWIPEDIST, (double)*PSWIPEDIST);