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

set_simple_fullscreen content is obscured by "The Notch" #3742

Closed
sfsam opened this issue Jun 19, 2024 · 2 comments · Fixed by #3890
Closed

set_simple_fullscreen content is obscured by "The Notch" #3742

sfsam opened this issue Jun 19, 2024 · 2 comments · Fixed by #3890
Labels
B - bug Dang, that shouldn't have happened DS - macos

Comments

@sfsam
Copy link

sfsam commented Jun 19, 2024

Description

New MacBooks have a camera housing that protrudes into the screen. The set_simple_fullscreen method does not seem to take this "feature" of newer laptops into account. Thus, window content is obscured by "The Notch". Apple provides an API for macOS 12+ to address this issue. Use the safeAreaInsets property to size content so it won't be obscured:

The safe area reflects the unobscured portion of the screen. On some Macs, 
the insets reflect the portion of the screen covered by the camera housing. 
If your app offers a custom full-screen experience, apply the specified insets 
to the screen’s frame rectangle to obtain the area within which it is safe to 
display your content. Content in the safe area is guaranteed to be unobscured.

https://developer.apple.com/documentation/appkit/nsscreen/3882821-safeareainsets?language=objc

macOS version

macOS 14.5 (23F79)

Winit version

0.30.2

@sfsam sfsam added B - bug Dang, that shouldn't have happened DS - macos labels Jun 19, 2024
@daxpedda
Copy link
Member

@madsmtm I believe this is a duplicate of #2066.

See #2308 as well.

@daxpedda
Copy link
Member

Closing as a duplicate of #2308.

@daxpedda daxpedda closed this as not planned Won't fix, can't repro, duplicate, stale Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B - bug Dang, that shouldn't have happened DS - macos
Development

Successfully merging a pull request may close this issue.

2 participants