diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-07-19 18:30:53 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-07-19 18:30:53 +0200 |
| commit | 0026414f9bbefed9ba4838b600dd2566968bfc8a (patch) | |
| tree | a40da470c39930d87a3282ee6181595c59404994 /src/managers/input/Swipe.cpp | |
| parent | ce8d655fadae18cbb8d58679edd7601f76177811 (diff) | |
fix workspace swipes mistake
Diffstat (limited to 'src/managers/input/Swipe.cpp')
| -rw-r--r-- | src/managers/input/Swipe.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
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; |
