From 3132f0275e78bdf1a78aee4ccd2944e9e5ba95bd Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 22 Jul 2024 13:05:06 +0200 Subject: [PATCH] touch: set lastInputTouch on every event --- src/managers/input/Touch.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/managers/input/Touch.cpp b/src/managers/input/Touch.cpp index 736a2ae5..7863140b 100644 --- a/src/managers/input/Touch.cpp +++ b/src/managers/input/Touch.cpp @@ -6,6 +6,8 @@ #include "../SeatManager.hpp" void CInputManager::onTouchDown(ITouch::SDownEvent e) { + m_bLastInputTouch = true; + static auto PSWIPETOUCH = CConfigValue("gestures:workspace_swipe_touch"); static auto PGAPSOUTDATA = CConfigValue("general:gaps_out"); auto* const PGAPSOUT = (CCssGapData*)(PGAPSOUTDATA.ptr())->getData(); @@ -54,8 +56,6 @@ void CInputManager::onTouchDown(ITouch::SDownEvent e) { } } - m_bLastInputTouch = true; - m_sTouchData.touchFocusWindow = m_pFoundWindowToFocus; m_sTouchData.touchFocusSurface = m_pFoundSurfaceToFocus; m_sTouchData.touchFocusLS = m_pFoundLSToFocus; @@ -83,6 +83,8 @@ void CInputManager::onTouchDown(ITouch::SDownEvent e) { } void CInputManager::onTouchUp(ITouch::SUpEvent e) { + m_bLastInputTouch = true; + EMIT_HOOK_EVENT_CANCELLABLE("touchUp", e); if (m_sActiveSwipe.pWorkspaceBegin) { // If there was a swipe from this finger, end it. @@ -96,6 +98,8 @@ void CInputManager::onTouchUp(ITouch::SUpEvent e) { } void CInputManager::onTouchMove(ITouch::SMotionEvent e) { + m_bLastInputTouch = true; + EMIT_HOOK_EVENT_CANCELLABLE("touchMove", e); if (m_sActiveSwipe.pWorkspaceBegin) { // Do nothing if this is using a different finger.