The clear title bar is said in SwiftUI — a configuration pass stops painting the bar back over the board's picture
`titlebarAppearsTransparent` is not the app's to hold on a scene window: it is the AppKit face of the tree's resolved `toolbarBackgroundVisibility`, and SwiftUI writes it on every pass that re-applies a window's configuration. The board stated nothing, so `.automatic` resolved and each pass put `false` back over what `HostedWindowController` had set out of band — correct on open, because the walk lands after the pass that follows window creation, and opaque at the next one, with nothing to re-assert it since the board's own reading had not changed. The board now declares the posture where SwiftUI will keep asserting it; the AppKit write stays as the same value one turn earlier. Claude-Session: https://claude.ai/code/session_014PtZdPwqZuqEDLc6wZMtEy
This commit is contained in:
@@ -285,6 +285,18 @@ final class HostedWindowController: NSObject, NSWindowDelegate {
|
||||
/// what stops the title bar from painting its own material over it. Either alone is a visible
|
||||
/// half-state — an opaque bar over the board, or a board that stops at a bar that no longer
|
||||
/// draws.
|
||||
///
|
||||
/// **The second knob does not stay written, and this is not the place that keeps it.** On a
|
||||
/// SwiftUI scene window `titlebarAppearsTransparent` is SwiftUI's: it is the AppKit face of the
|
||||
/// view tree's resolved `toolbarBackgroundVisibility(for: .windowToolbar)`, and SwiftUI writes
|
||||
/// the resolved value — changed or not — on every pass in which it re-applies a window's
|
||||
/// configuration. A tree that states nothing resolves `.automatic`, so each of those passes put
|
||||
/// `false` back over what this method had set, and the board's title bar went opaque some time
|
||||
/// after the board opened rather than at once. So the board *also* says it in SwiftUI
|
||||
/// (`BoardWindowHost`, which owns the reasoning), and this write is what makes the posture true
|
||||
/// for the turn in which the board's `background:` first reads, not what makes it last.
|
||||
///
|
||||
/// The `fullSizeContentView` half has no such second owner and survives on its own.
|
||||
private func applyTitlebarExtensionIfPossible() {
|
||||
guard let window, let extendsUnderTitlebar else { return }
|
||||
window.titlebarAppearsTransparent = extendsUnderTitlebar
|
||||
|
||||
Reference in New Issue
Block a user