diff options
| author | Agent00Ming <107314235+Agent00Ming@users.noreply.github.com> | 2024-06-03 16:47:02 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-03 22:47:02 +0200 |
| commit | d0a224a4915b5a90555818ed3f9e49e1a61b7cdb (patch) | |
| tree | d128a4d527f6602bba8fe34f500a1fce610ea446 /src/managers/SeatManager.cpp | |
| parent | 5517cc506b2754cb2485b1bf3e46918ee638ea6d (diff) | |
seat: discrete round away from zero + high res scrolling (#6317)
* Discrete scrolling round away from zero
e.deltaDiscrete can be multiples of 30 instead of the usual 120 causing
the rounded value to be 0 when too small causing erratic scrolling.
* Send value120 alongside discrete
Fixes sensitivity issues for clients that support value120 axis events
Diffstat (limited to 'src/managers/SeatManager.cpp')
| -rw-r--r-- | src/managers/SeatManager.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/managers/SeatManager.cpp b/src/managers/SeatManager.cpp index ce40650d..5fa3d1ae 100644 --- a/src/managers/SeatManager.cpp +++ b/src/managers/SeatManager.cpp @@ -290,7 +290,7 @@ void CSeatManager::sendPointerFrame(WP<CWLSeatResource> pResource) { } } -void CSeatManager::sendPointerAxis(uint32_t timeMs, wl_pointer_axis axis, double value, int32_t discrete, wl_pointer_axis_source source, +void CSeatManager::sendPointerAxis(uint32_t timeMs, wl_pointer_axis axis, double value, int32_t discrete, int32_t value120, wl_pointer_axis_source source, wl_pointer_axis_relative_direction relative) { if (!state.pointerFocusResource) return; @@ -303,8 +303,10 @@ void CSeatManager::sendPointerAxis(uint32_t timeMs, wl_pointer_axis axis, double p->sendAxisSource(source); p->sendAxisRelativeDirection(axis, relative); - if (source == 0) + if (source == 0) { + p->sendAxisValue120(axis, value120); p->sendAxisDiscrete(axis, discrete); + } if (value == 0) p->sendAxisStop(timeMs, axis); |
