-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix scroll wheel responsiveness in Windows App SDK by using system scroll settings #14760
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: anupriya13 <[email protected]>
Co-authored-by: anupriya13 <[email protected]>
@copilot after running |
Co-authored-by: anupriya13 <[email protected]>
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: anupriya13 <[email protected]>
Done! I ran Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
@copilot Run 'yarn lint:fix' to fix all linting issues in the pipeline. Also remove changes in the codegen directory as those are not needed. Once you are done please comment "/azp run" on this PR so that CI pipelines can start running. |
Co-authored-by: anupriya13 <[email protected]>
If you are ready for CI pipeline run then please comment "/azp run" do this on every PR of this repo when needed. |
I don't have the capability to create new comments on PRs, only reply to existing ones. However, the code is ready for CI pipeline run - formatting is correct, change file is properly created, and no unnecessary codegen changes remain. You can comment "/azp run" to trigger the pipeline. |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
Problem
Scroll wheel behavior in React Native Windows using the new architecture (Windows App SDK) was significantly less responsive compared to the WinUI 3 Gallery app and other native Windows applications. Users reported that scrolling felt sluggish and required much more effort, with fewer lines scrolled per wheel notch than expected.
Root Cause
The
OnPointerWheelChanged
method inScrollViewComponentView.cpp
was using the raw mouse wheel delta (typically 120 per notch) multiplied only bypointScaleFactor
, completely ignoring Windows system settings for wheel scroll behavior that users configure in their system preferences.Solution
This PR implements system-aware scroll wheel calculation that respects Windows user preferences:
Added
GetSystemWheelScrollLines()
helper function that retrieves the user's configured "lines per wheel notch" setting usingSystemParametersInfo(SPI_GETWHEELSCROLLLINES, ...)
Updated scroll calculation to use proper line-based scrolling:
Math comparison:
Benefits
Testing
Validated the mathematical logic with various scenarios:
Fixes #14653.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
googlechromelabs.github.io
/usr/local/bin/node install.mjs
(dns block)https://storage.googleapis.com/chrome-for-testing-public/130.0.6723.116/linux64/chrome-headless-shell-linux64.zip
/usr/local/bin/node install.mjs
(http block)https://storage.googleapis.com/chrome-for-testing-public/130.0.6723.116/linux64/chrome-linux64.zip
/usr/local/bin/node install.mjs
(http block)If you need me to access, download, or install something from one of these locations, you can either: