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

Use window.outer_size on iOS #421

Merged
merged 1 commit into from
Jul 1, 2024
Merged

Use window.outer_size on iOS #421

merged 1 commit into from
Jul 1, 2024

Conversation

johanholmerin
Copy link
Contributor

As I understand it, on iOS the outer_size corresponds to the size of the window, meaning when the surface is rendered using inner_size(the safe/non-obscured size) the elements get stretched.

There's an open issue in winit about clarifying/standardizing the different sizes, but until that's done switching to outer_size fixes the issue.

The touch positions now also match the rendering

Winit issue: rust-windowing/winit#2308

Fixes #419

Before

xilem ios

After

ios after

As I understand it, on iOS the outer_size corresponds to the size of the
window, meaning when the surface is rendered using inner_size(the
safe/non-obscured size) the elements get stretched.

There's an open issue in winit about clarifying/standardizing the
different sizes, but until that's done switching to outer_size fixes the
issue.

The touch positions now also match the rendering

Winit issue: rust-windowing/winit#2308

Fixes #419
Copy link
Contributor

@nicoburns nicoburns left a comment

Choose a reason for hiding this comment

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

We'll want to properly handle the "safe area" at some point, but that seems to be blocked on the linked winit issue. This seems like a good short term fix.

@nicoburns nicoburns added this pull request to the merge queue Jul 1, 2024
Merged via the queue into linebender:main with commit ca55151 Jul 1, 2024
16 checks passed
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.

Scale issue on iOS
2 participants