macos: don't overwrite the .fullScreen styleMask option in reapplyHiddenStyle (#7738)

Fixes #7625 (which apparently didn't catch anyone's attention, but I'd
be very surprised if no one were able to reproduce it if they tried;
also, re discord chat)
This commit is contained in:
Mitchell Hashimoto
2025-06-30 11:31:04 -07:00
committed by GitHub

View File

@@ -19,20 +19,27 @@ class HiddenTitlebarTerminalWindow: TerminalWindow {
NotificationCenter.default.removeObserver(self)
}
private static let hiddenStyleMask: NSWindow.StyleMask = [
// We need `titled` in the mask to get the normal window frame
.titled,
// Full size content view so we can extend
// content in to the hidden titlebar's area
.fullSizeContentView,
.resizable,
.closable,
.miniaturizable,
]
/// Apply the hidden titlebar style.
private func reapplyHiddenStyle() {
styleMask = [
// We need `titled` in the mask to get the normal window frame
.titled,
// Full size content view so we can extend
// content in to the hidden titlebar's area
.fullSizeContentView,
.resizable,
.closable,
.miniaturizable,
]
// Apply our style mask while preserving the .fullScreen option
if styleMask.contains(.fullScreen) {
styleMask = Self.hiddenStyleMask.union([.fullScreen])
} else {
styleMask = Self.hiddenStyleMask
}
// Hide the title
titleVisibility = .hidden