summaryrefslogtreecommitdiff
path: root/src/managers/input/Swipe.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-07-22 00:13:56 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-07-22 00:13:56 +0200
commitfa1273f258b9ea8c160033bcf19bb9beafcbb4e1 (patch)
tree2e7e3275df73a4137797eaf226c3834ce8d3de4b /src/managers/input/Swipe.cpp
parent8f66ddcad0fba99ccb9694342bdc36ef82c1c980 (diff)
minor changes to swipes
Diffstat (limited to 'src/managers/input/Swipe.cpp')
-rw-r--r--src/managers/input/Swipe.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/managers/input/Swipe.cpp b/src/managers/input/Swipe.cpp
index 0d988b49..19dca88b 100644
--- a/src/managers/input/Swipe.cpp
+++ b/src/managers/input/Swipe.cpp
@@ -108,6 +108,8 @@ void CInputManager::onSwipeUpdate(wlr_pointer_swipe_update_event* e) {
if (workspaceIDLeft == INT_MAX || workspaceIDRight == INT_MAX || workspaceIDLeft == m_sActiveSwipe.pWorkspaceBegin->m_iID)
return;
+ m_sActiveSwipe.pWorkspaceBegin->m_bForceRendering = true;
+
m_sActiveSwipe.delta = std::clamp(m_sActiveSwipe.delta, (double)-*PSWIPEDIST, (double)*PSWIPEDIST);
if (m_sActiveSwipe.delta < 0) {
@@ -120,11 +122,9 @@ void CInputManager::onSwipeUpdate(wlr_pointer_swipe_update_event* e) {
PWORKSPACE->m_bForceRendering = true;
- if (workspaceIDLeft != workspaceIDRight) {
- const auto PWORKSPACER = g_pCompositor->getWorkspaceByID(workspaceIDRight);
+ const auto PWORKSPACER = g_pCompositor->getWorkspaceByID(workspaceIDRight);
- PWORKSPACER->m_bForceRendering = true;
- }
+ PWORKSPACER->m_bForceRendering = true;
PWORKSPACE->m_vRenderOffset.setValueAndWarp(Vector2D(((- m_sActiveSwipe.delta) / *PSWIPEDIST) * m_sActiveSwipe.pMonitor->vecSize.x - m_sActiveSwipe.pMonitor->vecSize.x, 0));
m_sActiveSwipe.pWorkspaceBegin->m_vRenderOffset.setValueAndWarp(Vector2D(((- m_sActiveSwipe.delta) / *PSWIPEDIST) * m_sActiveSwipe.pMonitor->vecSize.x, 0));
@@ -140,11 +140,9 @@ void CInputManager::onSwipeUpdate(wlr_pointer_swipe_update_event* e) {
PWORKSPACE->m_bForceRendering = true;
- if (workspaceIDLeft != workspaceIDRight) {
- const auto PWORKSPACEL = g_pCompositor->getWorkspaceByID(workspaceIDLeft);
+ const auto PWORKSPACEL = g_pCompositor->getWorkspaceByID(workspaceIDLeft);
- PWORKSPACEL->m_bForceRendering = true;
- }
+ PWORKSPACEL->m_bForceRendering = true;
PWORKSPACE->m_vRenderOffset.setValueAndWarp(Vector2D(((- m_sActiveSwipe.delta) / *PSWIPEDIST) * m_sActiveSwipe.pMonitor->vecSize.x + m_sActiveSwipe.pMonitor->vecSize.x, 0));
m_sActiveSwipe.pWorkspaceBegin->m_vRenderOffset.setValueAndWarp(Vector2D(((- m_sActiveSwipe.delta) / *PSWIPEDIST) * m_sActiveSwipe.pMonitor->vecSize.x, 0));