Skip to content

feat(desktop): macOS full-window-content title bar - #680

Open
azooz5959 wants to merge 2 commits into
NuvioMedia:Devfrom
azooz5959:feat/macos-title-bar
Open

azooz5959 wants to merge 2 commits into
NuvioMedia:Devfrom
azooz5959:feat/macos-title-bar

Conversation

@azooz5959

@azooz5959 azooz5959 commented Sep 15, 2026

Copy link
Copy Markdown

Summary

Adopts Apple's native full-window-content title bar on macOS, so the traffic
lights sit directly over the app's own artwork instead of on a separate grey
title bar strip. Also realigns the streams back button so it matches the meta
details screen and clears the traffic lights.

macOS only — Windows and Linux code paths are untouched.

Before / after

Before A grey native title bar strip with the "Nuvio" title, with a visible seam above the content.
After Content extends under the traffic lights; no strip, no seam.

Screenshots attached in a comment below.

Changes

DesktopWindowChrome.kt — new configureMacosWindowBeforePeer(window) sets
three root pane client properties:

putClientProperty("apple.awt.fullWindowContent", true)
putClientProperty("apple.awt.transparentTitleBar", true)
putClientProperty("apple.awt.windowTitleVisible", false)

Main.kt — switched Window(...) to SwingWindow(..., init = ::configureMacosWindowBeforePeer).

This matters: AWT reads those client properties when it creates the native
NSWindow peer and ignores them afterwards, so they have to be set before
the window is displayable. SwingWindow's init hook is the point where that
is guaranteed. A check(!window.isDisplayable) assertion in
configureMacosWindowBeforePeer fails loudly if that invariant is ever broken
by a future refactor.

No NSWindow.styleMask mutation and no NSVisualEffectView insertion into the
AWT content view — both interfere with the Skiko Metal layer.

StreamsScreen.kt — under full-window-content, WindowInsets.safeDrawing
reports no top inset on macOS, so the back button landed on top of the traffic
lights. The desktop branch now uses the same geometry as the meta details
screen (32dp top, standard page horizontal inset, 48dp button, 24dp icon,
translucent black container). Mobile metrics are unchanged.

Test plan

  • Built and launched on macOS 15 (arm64, Oracle JDK 26, Metal backend), both before and after the change.
  • No SIGSEGV / no hs_err_pid*.log produced across repeated launches.
  • Window dragging by the title bar area, minimise, zoom and fullscreen all still work (native controls unchanged).
  • No content shift or clipping at the top of any screen.
  • Streams back button no longer overlaps the traffic lights, and now sits in the same place as on the details screen.
  • Not verified on Windows/Linux — those paths are unmodified by this PR.

Configure Apple's full-window-content chrome before the AWT peer exists so
the traffic lights sit over the app's own content, and nudge the streams
back button down on desktop to clear them.
Match the meta details screen's desktop back button geometry so the
control lands in the same place across both screens: 32dp top padding,
the standard page horizontal inset, 48dp button with a 24dp icon, and
the same translucent black container.

Mobile metrics are unchanged.
@azooz5959

Copy link
Copy Markdown
Author
titlebar_before_after

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.

1 participant