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

Scrolling in chromium based applications not working #152

Open
meir opened this issue Feb 10, 2025 · 8 comments
Open

Scrolling in chromium based applications not working #152

meir opened this issue Feb 10, 2025 · 8 comments

Comments

@meir
Copy link

meir commented Feb 10, 2025

There has been a merge request for this before but that code has changed later on: #67
It seems to only affect chromium based programs (Discord and Spotify for example)

OS: NixOS 25.05 (unstable)
WM: Hyprland (0.47.0)
VR/HW: SteamVR + Valve Index
Version: v0.6

@meir
Copy link
Author

meir commented Feb 11, 2025

Quickly tested it out with the changes from the PR, they do seem to still work however the mouse cannot be moved during it and hovering over with your other hand will stop the scrolling

@olekolek1000
Copy link
Collaborator

Yes, the mouse movement pause is an intended behavior. Scrolling should work just fine on the latest main branch. However, the second hand causing scrolling to stop is likely due to its update of the mouse position, which can interrupt scrolling in Chromium-based apps.

@meir
Copy link
Author

meir commented Feb 11, 2025

Scrolling does not work for me on v0.6 or the main branch either, however when i reintroduce the changed from the PR, then it does work.

@galister
Copy link
Owner

@meir what refresh rate is your monitor that the electron app is running on?

@meir
Copy link
Author

meir commented Feb 11, 2025

The monitor its on is running on 60hz i believe

@galister
Copy link
Owner

galister commented Feb 11, 2025

The problem with electron apps is that if they receive a scroll event on the same frame as they receive a pointer move event, the move event will be prioritized and the scroll event will be ignored.

For some reason, any other app can handle move and scroll at the same time.

What old wlx used to do is to simply not move the mouse while the user held the scroll binding.

We replaced this behavior with one where we alter the events; on frames where a scroll event needs to be sent, a move event will not be sent. The move event will be sent on the next frame instead.

The potential problem is that if the headset (and thus wlx) is running at 120hz and the monitor is running at 60hz, then the app will receive 2 frames worth of events from wlx within the same frame, basically cancelling out the altered packets.

I don't have any electron-based app to test with, but I would expect it to work well with a higher refresh rate monitor, or a lower refresh rate setting of the hmd.

The ideal solution would be to make it respect the display's refresh rate.

@galister
Copy link
Owner

alternatively, you can try setting the following via conf.d:

mouse_move_interval_ms: 33

@Anti-Apple4life
Copy link

I set mouse_move_interval_ms: 33 in a conf.d file, and it did not fix the issue. The mouse was a bit laggier though.

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