From 53c3644c2957da45cf8274004f38619644dc5f5b Mon Sep 17 00:00:00 2001 From: vaxerski Date: Thu, 20 Oct 2022 15:02:46 +0100 Subject: [PATCH] fix minor anim issue with swipe new --- src/managers/input/Swipe.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/managers/input/Swipe.cpp b/src/managers/input/Swipe.cpp index 07b07dcf..6f6a718b 100644 --- a/src/managers/input/Swipe.cpp +++ b/src/managers/input/Swipe.cpp @@ -216,7 +216,14 @@ void CInputManager::onSwipeUpdate(wlr_pointer_swipe_update_event* e) { g_pCompositor->updateWorkspaceWindowDecos(workspaceIDLeft); } else { - if (workspaceIDRight < m_sActiveSwipe.pWorkspaceBegin->m_iID && !*PSWIPENEW){ + if (workspaceIDRight < m_sActiveSwipe.pWorkspaceBegin->m_iID) { + if (*PSWIPENEW) { + if (VERTANIMS) + m_sActiveSwipe.pWorkspaceBegin->m_vRenderOffset.setValueAndWarp(Vector2D(0, ((-m_sActiveSwipe.delta) / *PSWIPEDIST) * m_sActiveSwipe.pMonitor->vecSize.y)); + else + m_sActiveSwipe.pWorkspaceBegin->m_vRenderOffset.setValueAndWarp(Vector2D(((-m_sActiveSwipe.delta) / *PSWIPEDIST) * m_sActiveSwipe.pMonitor->vecSize.x, 0)); + return; + } m_sActiveSwipe.delta = 0; return; }