wayland: fix handling of non-discrete scroll events (#9548)

https://github.com/zed-industries/zed/pull/9103 broke touchpad scrolling
on Wayland
This PR correctly filters the `Axis` to handle all non-discrete scroll
events (see
https://wayland.app/protocols/wayland#wl_pointer:enum:axis_source)

Should fix https://github.com/zed-industries/zed/issues/9525

Release Notes:

- N/A
This commit is contained in:
apricotbucket28 2024-03-19 16:25:10 -03:00 committed by GitHub
parent 8ae5a3b61a
commit 2c36652be2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -966,8 +966,9 @@ impl Dispatch<wl_pointer::WlPointer, ()> for WaylandClientState {
value,
..
} => {
// We handle discrete scroll events with `AxisValue120`.
if wl_pointer.version() >= wl_pointer::EVT_AXIS_VALUE120_SINCE
&& state.axis_source != AxisSource::Continuous
&& state.axis_source == AxisSource::Wheel
{
return;
}