diff --git a/src/managers/input/Swipe.cpp b/src/managers/input/Swipe.cpp index 98f31945..d606dc98 100644 --- a/src/managers/input/Swipe.cpp +++ b/src/managers/input/Swipe.cpp @@ -58,6 +58,10 @@ void CInputManager::onSwipeEnd(wlr_pointer_swipe_end_event* e) { PWORKSPACEL->m_vRenderOffset.setValue(RENDEROFFSET); PWORKSPACEL->m_fAlpha.setValueAndWarp(255.f); + m_sActiveSwipe.pWorkspaceBegin->m_vRenderOffset.setValue(RENDEROFFSETMIDDLE); + m_sActiveSwipe.pWorkspaceBegin->m_vRenderOffset = Vector2D(m_sActiveSwipe.pMonitor->vecSize.x, 0); + m_sActiveSwipe.pWorkspaceBegin->m_fAlpha.setValueAndWarp(255.f); + Debug::log(LOG, "Ended swipe to the left"); } else { // switch to right @@ -68,12 +72,13 @@ void CInputManager::onSwipeEnd(wlr_pointer_swipe_end_event* e) { PWORKSPACER->m_vRenderOffset.setValue(RENDEROFFSET); PWORKSPACER->m_fAlpha.setValueAndWarp(255.f); + m_sActiveSwipe.pWorkspaceBegin->m_vRenderOffset.setValue(RENDEROFFSETMIDDLE); + m_sActiveSwipe.pWorkspaceBegin->m_vRenderOffset = Vector2D(-m_sActiveSwipe.pMonitor->vecSize.x, 0); + m_sActiveSwipe.pWorkspaceBegin->m_fAlpha.setValueAndWarp(255.f); + Debug::log(LOG, "Ended swipe to the right"); } - m_sActiveSwipe.pWorkspaceBegin->m_vRenderOffset.setValue(RENDEROFFSETMIDDLE); - m_sActiveSwipe.pWorkspaceBegin->m_fAlpha.setValueAndWarp(255.f); - PWORKSPACEL->m_bForceRendering = false; PWORKSPACER->m_bForceRendering = false; m_sActiveSwipe.pWorkspaceBegin->m_bForceRendering = false;