We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5495

Summary: [PATCH] Continuous scroll events are way too fast on Wayland
Product: SDL Reporter: Cameron Gutman <cameron.gutman>
Component: eventsAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: x86_64   
OS: Linux   
Attachments: Patch

Description Cameron Gutman 2021-01-23 01:23:37 UTC
When using GNOME Wayland on an XPS 13 9370, the trackpad scrolls way too fast. Nearly each of the high-resolution scroll events generates a SDL_MOUSEWHEEL event for a full "tick" of the scroll wheel.

Like how Windows generates scroll events which are fractional units of WHEEL_DELTA, Wayland compositors seem to have standardized on 10 units per wheel tick ratio to match with the Weston reference compositor (see link below). Since we're not handling that, scrolling is 10x too fast on Wayland.

https://chromium.googlesource.com/chromium/src/+/master/components/exo/wayland/wayland_pointer_delegate.cc#104
Comment 1 Cameron Gutman 2021-01-23 01:24:33 UTC
Created attachment 4691 [details]
Patch
Comment 2 Sam Lantinga 2021-01-23 17:32:43 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/cff8177f36f0