fix(apple): fill the notch in macOS fullscreen — stop letterboxing below the camera housing
apple / swift (push) Successful in 55s
ci / rust (push) Successful in 1m11s
android / android (push) Successful in 1m55s
ci / web (push) Successful in 31s
ci / docs-site (push) Successful in 32s
ci / bench (push) Successful in 1m48s
decky / build-publish (push) Successful in 23s
deb / build-publish (push) Successful in 2m21s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 16s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 2m37s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 3m56s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 25s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 2m42s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 5m17s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 4m51s
docker / deploy-docs (push) Successful in 21s

The macOS sessionView branch was missing the .ignoresSafeArea() its iOS/tvOS
siblings have, so in fullscreen the stream was laid out in the safe area below the
notch; the aspect-fit video then scaled down to that smaller area and left black
borders. Add .ignoresSafeArea() so the stream fills the whole display including
behind the camera housing (a thin top-center strip occluded — normal fullscreen-
video behavior); at the display's native mode it's now a 1:1 fill. Inert in
windowed mode and on non-notched displays. NSPrefersDisplaySafeAreaCompatibilityMode
is deliberately not used (it shrinks the whole window with borders on all sides).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-15 23:57:06 +02:00
parent 4b0b775e8e
commit ef30afcf0b
@@ -145,6 +145,13 @@ struct ContentView: View {
#if os(macOS) #if os(macOS)
.frame(minWidth: 640, minHeight: 360) .frame(minWidth: 640, minHeight: 360)
.background(Color.black) .background(Color.black)
// Fill the whole display in fullscreen, INCLUDING behind the camera housing (notch).
// Without this the stream is laid out in the safe area below the notch, so an
// aspect-fit video at the display's native mode scales down and leaves black borders.
// A fullscreen video behind the notch (a thin top-center strip occluded) is the
// expected behavior same edge-to-edge intent as the iOS/tvOS branches below. Inert
// in windowed mode (no notch safe-area inset on a titled window).
.ignoresSafeArea()
#elseif os(iOS) #elseif os(iOS)
// Streaming is immersive: edge-to-edge under the status bar and home // Streaming is immersive: edge-to-edge under the status bar and home
// indicator, both hidden for the session (they return with the hosts grid). // indicator, both hidden for the session (they return with the hosts grid).