summaryrefslogtreecommitdiff
path: root/src/managers/input/Touch.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-07-22 13:05:06 +0200
committerVaxry <vaxry@vaxry.net>2024-07-22 13:05:06 +0200
commit3132f0275e78bdf1a78aee4ccd2944e9e5ba95bd (patch)
tree6c51fa6fb84d662c056097123ae3840ca403129d /src/managers/input/Touch.cpp
parent1797319a0785cf9ae4f406d40bc27b032c6f5fb2 (diff)
touch: set lastInputTouch on every event
Diffstat (limited to 'src/managers/input/Touch.cpp')
-rw-r--r--src/managers/input/Touch.cpp8
1 files 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<Hyprlang::INT>("gestures:workspace_swipe_touch");
static auto PGAPSOUTDATA = CConfigValue<Hyprlang::CUSTOMTYPE>("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.