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

pulseaudio scrolling goes in what feels the wrong direction, negative scroll-step not supported #1140

Open
chris-morgan opened this issue Jun 25, 2021 · 4 comments

Comments

@chris-morgan
Copy link

waybar 0.9.7, Arch Linux, “natural scrolling” enabled on my laptop’s touchpad.

Two parts to this:

  1. On a pulseaudio widget, swiping two fingers upwards causes volume to go down. I expect this action to make it go up. (If I disable natural scrolling, it does.)

    I will note that <input type=number> in Firefox treats scrolling the same way that waybar-pulseaudio is. I find this just as disconcerting and wrong. I haven’t tried anything else to see if it’s universal or not.

    It’s distinctly possible that this sort of control should be one of the rare things that actually ignores the natural scrolling setting.

  2. In order to work around this, I try setting scroll-step to a negative value, which should certainly work. But instead it causes scrolling to just do nothing.

@OJFord
Copy link

OJFord commented Apr 9, 2022

This is (probably - it is in my case) a consequence of having 'natural scroll' enabled, for example in swayconfig:

input type:touchpad {
  natural_scroll enabled
}

This is unexpected, because in the case of volume the default (natural_scroll disabled) behaviour is more, er, natural.

(Edit: oh sorry, definitely is in OP's case and seems you recognised that too, glossed over the first sentence.)

Perhaps it wasn't possible when you posted, but a workaround that does work is overriding on-scroll-{up,down} to switch them around.

Of course, this only works (as negative step would too) if you exclusively use a 'natural scroll' touchpad; never a mouse scrollwheel for example or any input that isn't configured as natural_scroll enabled.

@JayceFayne
Copy link

fixed by #1289

@OJFord
Copy link

OJFord commented Mar 11, 2023

That's just the mentioned work-around by a different method though really, doesn't help when you sometimes use a natural_scroll device and sometimes not - probably common among 'clamshell' users, a mouse when docked and a possibly-natural touchpad otherwise.

@korylprince
Copy link
Contributor

korylprince commented Jul 1, 2023

This has been bugging me, so I've been investigating ways to fix this.

The type of input that is scrolling can be detected from the GTK scroll event.

GdkEventScroll.get_source_device().input_source can be checked to see if the input is a mouse, touchpad, or trackpoint. (GTK-wayland code here)

I propose two solutions to allow intuitive scrolling for mice and touchpads simultaneously:

  • Ignore the "reverse-scrolling" option when the scroll event is generated by a mouse
    • I can't think of why anyone would actually want "natural scrolling" on a mouse wheel, and this would be an easier change...
  • Allow configuring "reverse-scrolling" for mice and touchpads separately
    • For backwards compatability, you could keep "reverse-scrolling" as a global on/off, and add "reverse-mouse-scrolling" and "reverse-touchpad-scrolling" to configure separately?

@Alexays, I'm happy to do a PR for this, but before I write the code, I want to make sure you're willing to accept one of the two above changes...

Edit: I went ahead and submitted a PR for option 1, since it's not that much code.

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

No branches or pull requests

4 participants