Skip to content

Commit

Permalink
wayland: fix handling of non-discrete scroll events (zed-industries#9548
Browse files Browse the repository at this point in the history
)

zed-industries#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 zed-industries#9525

Release Notes:

- N/A
  • Loading branch information
apricotbucket28 authored and pjlast committed Mar 26, 2024
1 parent 9668b0d commit 8e8733f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/gpui/src/platform/linux/wayland/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8e8733f

Please sign in to comment.