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

Fix macOS notch avoidance padding in full screen mode #5515

Merged
merged 1 commit into from
Jun 8, 2024
Merged

Fix macOS notch avoidance padding in full screen mode #5515

merged 1 commit into from
Jun 8, 2024

Conversation

mbaird
Copy link
Contributor

@mbaird mbaird commented Jun 4, 2024

Fixes #3807

The values returned by safeAreaInsets need to be multipled by the scale factor of the display (in case of the MacBook Pro 14-inch, 2021, a value of 2.0).

There's a code comment referencing #1737 (comment), where an extra 2 was added to this number, but something must have changed since then because I cannot see a need for this now.

(Not familiar with Rust, so let me know if there's a better way to write this!)

Fixes #3807

The values returned by [`safeAreaInsets`][0] need to be multipled by the
scale factor of the display (in case of the MacBook Pro 14-inch, 2021, a
value of 2.0).

There's a code comment referencing [#1737 (comment)][1], where an extra
`2` was added to this number, but something must have changed since then
because I cannot see a need for this now.

[0]: https://developer.apple.com/documentation/appkit/nsscreen/3882821-safeareainsets
[1]: #1737 (comment)
@mbaird mbaird changed the title Fix notch avoidance padding in full screen mode Fix macOS notch avoidance padding in full screen mode Jun 4, 2024
@wez wez merged commit af4f5ed into wez:main Jun 8, 2024
13 of 15 checks passed
wez added a commit that referenced this pull request Jun 8, 2024
@wez
Copy link
Owner

wez commented Jun 8, 2024

Thanks!

@mbaird mbaird deleted the adjust-notch-padding-scale branch June 18, 2024 09:47
saep pushed a commit to saep/wezterm that referenced this pull request Jul 14, 2024
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.

Tabs render "inside" the notch on macbooks with a notch when using non-native fullscreen
2 participants