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

Reverse horizontal scrolling on windows #966

Merged
merged 2 commits into from
Dec 20, 2021
Merged

Reverse horizontal scrolling on windows #966

merged 2 commits into from
Dec 20, 2021

Conversation

aevyrie
Copy link
Contributor

@aevyrie aevyrie commented Dec 17, 2021

Closes #965.

@@ -458,6 +458,9 @@ impl State {
// https://github.com/rust-windowing/winit/issues/1695 being closed
delta.x *= -1.0;
}
if cfg!(target_os = "windows") {
delta.x *= -1.0;
Copy link
Owner

Choose a reason for hiding this comment

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

if this is wrong on mac and windows, perhaps it is also wrong on linux? i.e perhaps we should just always invert delta.xno matter what platform

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree. However, it's not clear to me how we find the correct answer. As mentioned in #356, it appears that it's not even consistent across Linux desktop environments.

The only dev environment I have readily available is windows. I didn't want to cause problems on systems I can't test, and I wanted to keep this PR tightly scoped.

Most importantly, this is really a workaround for an upstream winit issue. If I can get this rust-windowing/winit#2101 merged, the egui issue and PR for horizontal scrolling on Windows can be closed.

egui-winit/src/lib.rs Outdated Show resolved Hide resolved
@emilk emilk merged commit c69fe94 into emilk:master Dec 20, 2021
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

Successfully merging this pull request may close these issues.

Horizontal scroll reversed in Windows native builds
2 participants