diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 26ee32a2..4177d753 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -161,7 +161,9 @@ jobs: STAGING_DIR="$(mktemp -d)" cp -R "$APP_PATH" "$STAGING_DIR/cmuxterm.app" ln -s /Applications "$STAGING_DIR/Applications" - hdiutil create -volname "cmuxterm" -srcfolder "$STAGING_DIR" -ov -format UDZO "$DMG_RELEASE" + # hdiutil defaults to APFS for -srcfolder images (volume name becomes "Untitled" on mount). + # Force HFS+ so the mounted volume name is stable and Finder shows the contents reliably. + hdiutil create -fs HFS+ -volname "cmuxterm" -srcfolder "$STAGING_DIR" -ov -format UDZO "$DMG_RELEASE" rm -rf "$STAGING_DIR" DMG_SUBMIT_JSON="$(xcrun notarytool submit "$DMG_RELEASE" --apple-id "$APPLE_ID" --team-id "$APPLE_TEAM_ID" --password "$APPLE_APP_SPECIFIC_PASSWORD" --wait --output-format json)" DMG_SUBMIT_ID="$(python3 -c 'import json,sys; print(json.load(sys.stdin)["id"])' <<<"$DMG_SUBMIT_JSON")" diff --git a/Sources/ContentView.swift b/Sources/ContentView.swift index 9d06c2e5..1764e767 100644 --- a/Sources/ContentView.swift +++ b/Sources/ContentView.swift @@ -23,7 +23,9 @@ enum WindowGlassEffect { let bounds = contentView.bounds - // macOS 26+: Use NSGlassEffectView as the new contentView (full replacement is safe) + // macOS 26+: Prefer NSGlassEffectView. Avoid re-parenting the SwiftUI NSHostingView via + // constraints (it can result in a blank content area). Keep the original content view + // on autoresizing masks and just insert it into the glass view. if let glassClass = NSClassFromString("NSGlassEffectView") as? NSVisualEffectView.Type { let glassView = glassClass.init(frame: bounds) glassView.wantsLayer = true @@ -37,21 +39,14 @@ enum WindowGlassEffect { } } - // Replace contentView — safe on macOS 26+ where traffic lights composite above window.contentView = glassView - contentView.translatesAutoresizingMaskIntoConstraints = false contentView.wantsLayer = true contentView.layer?.backgroundColor = NSColor.clear.cgColor + contentView.frame = glassView.bounds + contentView.autoresizingMask = [.width, .height] glassView.addSubview(contentView) - NSLayoutConstraint.activate([ - contentView.topAnchor.constraint(equalTo: glassView.topAnchor), - contentView.bottomAnchor.constraint(equalTo: glassView.bottomAnchor), - contentView.leadingAnchor.constraint(equalTo: glassView.leadingAnchor), - contentView.trailingAnchor.constraint(equalTo: glassView.trailingAnchor) - ]) - objc_setAssociatedObject(window, &glassViewKey, glassView, .OBJC_ASSOCIATION_RETAIN) return }