summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.hpp
diff options
context:
space:
mode:
authorAgent00Ming <107314235+Agent00Ming@users.noreply.github.com>2024-07-18 15:57:08 -0400
committerGitHub <noreply@github.com>2024-07-18 21:57:08 +0200
commit8e15f91c2417c8f05d69a93f1294185ccc5f8f3e (patch)
tree0aea9874615b9a953f0aef54c29047c3b8dbeb20 /src/managers/input/InputManager.hpp
parent300228b503b36e5977b0d58713c5b4cf1f07b8a9 (diff)
input: Emulate discrete scrolling from v120 events (#6881)
* seat: avoid sending axis_stop() when source is wheel * fix rounding for absolute discrete values greater than 1 Co-authored-by: Agent_00Ming <agent00ming9366@gmail.com>
Diffstat (limited to 'src/managers/input/InputManager.hpp')
-rw-r--r--src/managers/input/InputManager.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/managers/input/InputManager.hpp b/src/managers/input/InputManager.hpp
index 8050defe..85ae6197 100644
--- a/src/managers/input/InputManager.hpp
+++ b/src/managers/input/InputManager.hpp
@@ -278,6 +278,14 @@ class CInputManager {
void restoreCursorIconToApp(); // no-op if restored
+ // discrete scrolling emulation using v120 data
+ struct {
+ bool lastEventSign = 0;
+ bool lastEventAxis = 0;
+ uint32_t lastEventTime = 0;
+ uint32_t accumulatedScroll = 0;
+ } m_ScrollWheelState;
+
friend class CKeybindManager;
friend class CWLSurface;
};