Skip to content

Let fullscreen auto-hide the title-bar band - #596

Draft
jiweiyuan wants to merge 2 commits into
mainfrom
fix/fullscreen-auto-hide-toolbar
Draft

Let fullscreen auto-hide the title-bar band#596
jiweiyuan wants to merge 2 commits into
mainfrom
fix/fullscreen-auto-hide-toolbar

Conversation

@jiweiyuan

Copy link
Copy Markdown
Collaborator

Parked as a draft for the record — the mechanism works, but auto-hiding the whole title-bar band is probably the wrong call for the interaction. Not for merge as-is.

The bug

In fullscreen with a file detail maximized, a blank strip sat across the top of the screen: the title-bar band stayed reserved but empty, and it outlived the maximized detail.

NSToolbar.isVisible belongs to the windowed title bar. Once the fullscreen title-bar host owns the toolbar, hiding it there reserves the band without filling it — and writing the property back during a fullscreen transition makes AppKit drop the toolbar's items outright.

What this does

willUseFullScreenPresentationOptions is the only switch macOS reads for that band, so this asks for .autoHideToolbar and leaves the band to the system: it slides away with the menu bar and returns when the pointer reaches the top edge. syncMaximizedChrome stops writing isVisible on the fullscreen side of the boundary, and re-derives it a runloop after the exit transition, once the detail may still be maximized.

Why it's parked

AppKit asks for these options only on the way in, so auto-hide is a property of the whole fullscreen session — the maximize button can't toggle it. That means the band hides for every fullscreen session, not just a maximized detail, and it comes back on any pointer trip to the top edge. That's a bigger behavior change than the bug warranted, and it isn't obviously the better interaction.

Not verified on screen: the band only misbehaves in fullscreen with a maximized detail, and the app can't be screenshotted in fullscreen.

Release Notes: None — draft, not for merge.

`NSToolbar.isVisible` belongs to the windowed title bar. Once the
fullscreen title-bar host owns the toolbar, hiding it there left the band
reserved but empty — a blank strip across the top of the screen that
outlived the maximized detail — and writing the property back during a
fullscreen transition made AppKit drop the toolbar's items outright.

`willUseFullScreenPresentationOptions` is the only switch macOS reads for
that band, so ask for `.autoHideToolbar` there and leave the band to the
system: it slides away with the menu bar and returns when the pointer
reaches the top edge. `syncMaximizedChrome` stops writing `isVisible` on
that side of the boundary, and re-derives it a runloop after the exit
transition, once the detail may still be maximized.
@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
termio Ready Ready Preview Sep 1, 2026 8:11pm UTC

Request Review

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