Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Wayland Scroll Factor #5104

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mike-lloyd03
Copy link

@mike-lloyd03 mike-lloyd03 commented Mar 3, 2024

Wayland users are reporting that mouse and trackpad scrolling is much too fast under Wayland.

#3142
#4455

Using @SuperSandro2000's recommendation here, I've added a config option to modify the scroll factor on Wayland (config.wayland_scroll_factor).

I've found that setting this value to 0.25 is ideal on my environment (Hyprland, Zellij).

I haven't modified the documentation yet because I wanted to see if this was a desirable approach first. I suppose it's possible to derive a suitable scroll factor from the window's scale factor, but I do not have enough familiarity with the Wayland protocol to implement this. If the config option route is acceptable, I will update the docs.

This also fixes a typo in CONTRIBUTING.md as proof that I actually read it.

@wez
Copy link
Owner

wez commented May 5, 2024

Thanks for diving in!

I'm a bit reticent to merge this because what I suspect is that there is something else going on in how the mouse scroll events are interpreted. This commit is certainly an easy fix but I think that it could eg: produce different results with different compositors, or when different devices are attached.

I think a little bit more research is needed. For example, are there other Rust wayland apps that scroll more reasonably? If so, what are they doing to process the scroll events?

@SuperSandro2000
Copy link
Sponsor Contributor

Not sure if that helps, but the only other program where I encountered similar behavior is VSCode but there you can manually specific the scroll factor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants