summaryrefslogtreecommitdiff
path: root/src/managers/input/Swipe.cpp
diff options
context:
space:
mode:
authorxDarksome <dev@darkso.me>2022-08-21 16:03:51 +0300
committerGitHub <noreply@github.com>2022-08-21 16:03:51 +0300
commit0f25f3aee36c4f312a3fb36a7abb63fe78f5254e (patch)
tree7fed1128dccc2de8eac672d4ca57eaaedd2af323 /src/managers/input/Swipe.cpp
parent776750ee3473fd0ca44969a9a1c79679e5805a0f (diff)
parent5e1f2539cb24b10cad50eba4c3131190022d5ee0 (diff)
Merge branch 'hyprwm:main' into main
Diffstat (limited to 'src/managers/input/Swipe.cpp')
-rw-r--r--src/managers/input/Swipe.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/managers/input/Swipe.cpp b/src/managers/input/Swipe.cpp
index ca4c60e6..51be5248 100644
--- a/src/managers/input/Swipe.cpp
+++ b/src/managers/input/Swipe.cpp
@@ -143,11 +143,13 @@ void CInputManager::onSwipeUpdate(wlr_pointer_swipe_update_event* e) {
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(workspaceIDLeft);
PWORKSPACE->m_bForceRendering = true;
+ PWORKSPACE->m_fAlpha.setValueAndWarp(255.f);
if (workspaceIDLeft != workspaceIDRight) {
const auto PWORKSPACER = g_pCompositor->getWorkspaceByID(workspaceIDRight);
PWORKSPACER->m_bForceRendering = false;
+ PWORKSPACER->m_fAlpha.setValueAndWarp(0.f);
}
PWORKSPACE->m_vRenderOffset.setValueAndWarp(Vector2D(((- m_sActiveSwipe.delta) / *PSWIPEDIST) * m_sActiveSwipe.pMonitor->vecSize.x - m_sActiveSwipe.pMonitor->vecSize.x, 0));
@@ -163,11 +165,13 @@ void CInputManager::onSwipeUpdate(wlr_pointer_swipe_update_event* e) {
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(workspaceIDRight);
PWORKSPACE->m_bForceRendering = true;
+ PWORKSPACE->m_fAlpha.setValueAndWarp(255.f);
if (workspaceIDLeft != workspaceIDRight) {
const auto PWORKSPACEL = g_pCompositor->getWorkspaceByID(workspaceIDLeft);
PWORKSPACEL->m_bForceRendering = false;
+ PWORKSPACEL->m_fAlpha.setValueAndWarp(0.f);
}
PWORKSPACE->m_vRenderOffset.setValueAndWarp(Vector2D(((- m_sActiveSwipe.delta) / *PSWIPEDIST) * m_sActiveSwipe.pMonitor->vecSize.x + m_sActiveSwipe.pMonitor->vecSize.x, 0));