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

Don't apply reverse scrolling to mice wheels #2267

Merged
merged 3 commits into from
Jul 2, 2023

Conversation

korylprince
Copy link
Contributor

This is a fix for #1140.

Currently reverse-scrolling is applied globally. This can be annoying for those who use both a mouse and touchpad with "natural scrolling". In the case of scrolling to adjust volume, brightness, etc, scrolling up on a touchpad feels "natural" to adjust those things up.

However, this is the opposite of what "natural scrolling" does because it was designed for scrolling documents, which does feel natural to reverse up/down.

So what this means for Waybar is that if we leave reverse-scrolling = false, the mouse wheel feels natural, but the touchpad feels backwards. If we set reverse-scrolling = true, the touchpad feels natural, but the mouse wheel feels backwards.

This PR does two things to address this issue:

  • Fixes a regression introduced in Lift reverse-scrolling option into AModule #2232 that prevents reverse-scrolling from being applied on smooth scroll events (e.g. most touchpad events)
  • Disables reverse-scrolling on mouse wheel scroll events, even if reverse-scrolling = true

I can't see any good reason someone would want to apply "natural scrolling" to a mouse wheel. If you are concerned that someone might, I could refactor this to have independent reverse-mouse-scrolling and reverse-touchpad-scrolling config options, keeping the existing reverse-scrolling as a global option.

@Alexays
Copy link
Owner

Alexays commented Jul 1, 2023

LGTM

@Alexays
Copy link
Owner

Alexays commented Jul 1, 2023

Maybe we should add another option to force reverse ?

@korylprince
Copy link
Contributor Author

korylprince commented Jul 1, 2023

I added a commit that adds reverse-mouse-scrolling, so that reverse scrolling can be independently enabled for mice scroll wheels. Does that work?

I can also update the wiki once approved.

Edit: I know that's not exactly what you asked for, but if we have to add a new option anyways, this way it's a little more configurable. reverse-mouse-scrolling enables it for mice even if reverse-scrolling isn't enabled.

@Alexays Alexays merged commit 6b9600f into Alexays:master Jul 2, 2023
@Alexays
Copy link
Owner

Alexays commented Jul 2, 2023

Perfect!

@korylprince
Copy link
Contributor Author

The Backlight and PulseAudio wiki pages have been updated to reflect the changes in this PR.

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.

2 participants