aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/managers/input/Swipe.cpp
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-09-17 15:05:12 +0100
committervaxerski <[email protected]>2022-09-17 15:05:12 +0100
commita72a39ebd555c24751a0c4853a495de5ba4bed0d (patch)
tree0d2883604dc3d8f5fee36da5ba9206249195e779 /src/managers/input/Swipe.cpp
parent151e013241e29d0f4f2619db17257343503e20ea (diff)
downloadHyprland-a72a39ebd555c24751a0c4853a495de5ba4bed0d.tar.gz
Hyprland-a72a39ebd555c24751a0c4853a495de5ba4bed0d.zip
minor swipe fixes
Diffstat (limited to 'src/managers/input/Swipe.cpp')
-rw-r--r--src/managers/input/Swipe.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/managers/input/Swipe.cpp b/src/managers/input/Swipe.cpp
index fe78145d..30303680 100644
--- a/src/managers/input/Swipe.cpp
+++ b/src/managers/input/Swipe.cpp
@@ -10,7 +10,7 @@ void CInputManager::onSwipeBegin(wlr_pointer_swipe_begin_event* e) {
int onMonitor = 0;
for (auto& w : g_pCompositor->m_vWorkspaces) {
- if (w->m_iMonitorID == g_pCompositor->m_pLastMonitor->ID) {
+ if (w->m_iMonitorID == g_pCompositor->m_pLastMonitor->ID && w->m_iID != SPECIAL_WORKSPACE_ID) {
onMonitor++;
}
}
@@ -125,8 +125,10 @@ 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 || workspaceIDLeft == m_sActiveSwipe.pWorkspaceBegin->m_iID)
+ if (workspaceIDLeft == INT_MAX || workspaceIDRight == INT_MAX || workspaceIDLeft == m_sActiveSwipe.pWorkspaceBegin->m_iID) {
+ m_sActiveSwipe.pWorkspaceBegin = nullptr; // invalidate the swipe
return;
+ }
m_sActiveSwipe.pWorkspaceBegin->m_bForceRendering = true;