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

[Scroll Wheel] discrete round away from zero + high res scrolling #6317

Merged
merged 2 commits into from
Jun 3, 2024

Conversation

Agent00Ming
Copy link
Contributor

@Agent00Ming Agent00Ming commented Jun 2, 2024

Describe your PR, what does it fix/add?

Fixes #6278 and fixes #6299

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

Fixed an unnoticed bug where setting input:scroll_factor too low would cause discrete axis events to round to zero.

Is it ready for merging, or does it need work?

Ready for merging but could use some more testing.

@vaxerski vaxerski force-pushed the main branch 2 times, most recently from 16d0b4c to 358e59e Compare June 2, 2024 21:11
@Agent00Ming Agent00Ming force-pushed the discrete-rounding-fix branch 2 times, most recently from 6c8e2b5 to b3a5041 Compare June 2, 2024 21:21
@darkiox
Copy link

darkiox commented Jun 2, 2024

Scrolling now works without issues using wireless mouse, can confirm that sensitivity is way too high hahah. Here are some logs, if they are useful for anything.

Thanks @Agent00Ming !!!
hyprland_wev_scroll.log

@Ciel-MC
Copy link

Ciel-MC commented Jun 3, 2024

Works in Kitty, way too high, testing xwayland now

@Agent00Ming Agent00Ming force-pushed the discrete-rounding-fix branch from b3a5041 to 15bbfe2 Compare June 3, 2024 11:55
@Agent00Ming
Copy link
Contributor Author

Agent00Ming commented Jun 3, 2024

I think there's a better approach but this works as a band-aid fix for now. Applications have their own interpretation of discrete scrolling... the higher frequency of discrete scroll events works great in Firefox but not for terminal emulators and other apps... (the better approach being accumulating enough e.discreteDelta for a total of 120 and then send an event but that's also kinda shit)

Read up on the mess that is high-res scrolling here

@Agent00Ming Agent00Ming force-pushed the discrete-rounding-fix branch 2 times, most recently from d257126 to f6e7547 Compare June 3, 2024 12:39
@Agent00Ming Agent00Ming marked this pull request as ready for review June 3, 2024 17:18
@Agent00Ming
Copy link
Contributor Author

Agent00Ming commented Jun 3, 2024

@darkiox @Ciel-MC have a look at it now, it should be in a much better shape now. Blender still zooms in/out with crazy high sens because it doesn't support high resolution scrolling but kitty's scrolling seems much more reasonable now.

@Agent00Ming
Copy link
Contributor Author

note that this should not affect low resolution scrolling (most common wired mice) with the exception of fixing an unnoticed bug where putting your input:scroll_factor too low would cause discrete scroll events to be rounded down to 0.

@Agent00Ming Agent00Ming changed the title [Scroll Wheel] discrete round away from zero [Scroll Wheel] discrete round away from zero + high res scrolling Jun 3, 2024
@darkiox
Copy link

darkiox commented Jun 3, 2024

Just tested, still feels a bit fast for my liking.
Tried changing input:scroll_factor and it did work on Wayland apps, but XWayland apps don't change the scroll speed. (Is that intended? Don't know for sure)

@Agent00Ming
Copy link
Contributor Author

I'm afraid there isn't much we can do about xwayland clients, they take the scroll events at face value or something to that effect and don't support the wayland high resolution scrolling signals.

@Agent00Ming Agent00Ming force-pushed the discrete-rounding-fix branch from 1241b01 to ba662ef Compare June 3, 2024 17:50
@darkiox
Copy link

darkiox commented Jun 3, 2024

I'm afraid there isn't much we can do about xwayland clients, they take the scroll events at face value or something to that effect and don't support the wayland high resolution scrolling signals.

Yeah I guess so, that's why there is worlds of difference between applications. Firefox for example works great (launched on X just to test) but kitty still flies lmao. Tried on Minecraft too (games running on Xwayland also suffer from this), and noticed it scrolls 6 steps each scroll of the wheel.
This is good enough for me to be honest, if you need more testing just lmk.

src/layout/IHyprLayout.cpp Outdated Show resolved Hide resolved
e.deltaDiscrete can be multiples of 30 instead of the usual 120 causing
the rounded value to be 0 when too small causing erratic scrolling.
@Agent00Ming Agent00Ming force-pushed the discrete-rounding-fix branch 2 times, most recently from 5ba281e to 6f966c1 Compare June 3, 2024 18:19
Fixes sensitivity issues for clients that support value120 axis events
@Agent00Ming Agent00Ming force-pushed the discrete-rounding-fix branch from 6f966c1 to 62b8274 Compare June 3, 2024 18:33
Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thanks!

@vaxerski vaxerski merged commit d0a224a into hyprwm:main Jun 3, 2024
10 checks passed
@Agent00Ming Agent00Ming deleted the discrete-rounding-fix branch June 7, 2024 19:14
@Sewer56
Copy link

Sewer56 commented Jun 20, 2024

The scroll speed in xwayland applications certainly is a hassle though.

There's a good number of applications (unfortunately proprietary) that are stuck in this state on my end, and not being able to scale it really is far from ideal. Think games, where switching a weapon is tied to scroll; or IDEs.

Anyway, I managed to run into here while wondering what might have changed to make these apps scroll so fast.

@tecknogyk
Copy link

Yeah, this is just unusable for me. Discord, Easy Effects, Nautilus, and Dolphin all scroll way too fast. Unless something changes Hyprland is just not something I can use anymore. Everything was fine before I updated.

@Ciel-MC
Copy link

Ciel-MC commented Jun 26, 2024

Yeah, this is just unusable for me. Discord, Easy Effects, Nautilus, and Dolphin all scroll way too fast. Unless something changes Hyprland is just not something I can use anymore. Everything was fine before I updated.

All expect easy effects for me has Wayland support for which the scrolling is not broken, it’s currently only ruined on xwayland apps, try to make them launch under wayland

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