Don't apply reverse scrolling to mice wheels #2267
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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
andreverse-touchpad-scrolling
config options, keeping the existingreverse-scrolling
as a global option.