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

Remove logical pixel handling from scroll events #1483

Merged
merged 1 commit into from
Jul 26, 2020

Conversation

chrisduerr
Copy link
Contributor

@chrisduerr chrisduerr commented Feb 25, 2020

This removes the LogicalPosition from the PixelDelta, since all
other APIs have been switched to use PhysicalPosition instead too.

It also seems like LineDelta was using both logical and physical
sizes, depending on platform. I've changed this to explicitly take a
PhysicalPosition parameter to force a uniform return value.

I'm not entirely sure which platform uses which kind of pixel sizes by
default, so I've made the assumption that both the web and macOS
platforms deliver their events in LogicalPositions.

Fixes #1406.

Copy link
Member

@kchibisov kchibisov left a comment

Choose a reason for hiding this comment

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

Wayland bits are fine and overall change makes sense, since is impossible to represent LineDelta in logical pixels in a way it could make sense, since it's a count under the hood on some platforms.

@kchibisov kchibisov mentioned this pull request Mar 8, 2020
@kchibisov kchibisov force-pushed the lets_get_physical branch from a01d0a6 to aca6b7d Compare May 22, 2020 10:51
@kchibisov kchibisov requested a review from Osspial May 22, 2020 10:53
@kchibisov kchibisov force-pushed the lets_get_physical branch 2 times, most recently from 564f55a to e96aad2 Compare July 26, 2020 21:51
This removes the `LogicalPosition` from the `PixelDelta`, since all
other APIs have been switched to use `PhysicalPosition` instead too.

Fixes rust-windowing#1406.
@kchibisov kchibisov force-pushed the lets_get_physical branch from e96aad2 to 8fc18f5 Compare July 26, 2020 21:54
@kchibisov kchibisov merged commit 40232d4 into rust-windowing:master Jul 26, 2020
@chrisduerr chrisduerr deleted the lets_get_physical branch July 26, 2020 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent usage of LogicalPosition vs PhysicalPosition
4 participants