macos: don't overwrite the .fullScreen styleMask option in reapplyHiddenStyle
parent
66f73f7133
commit
b1f788a768
|
|
@ -19,9 +19,7 @@ class HiddenTitlebarTerminalWindow: TerminalWindow {
|
|||
NotificationCenter.default.removeObserver(self)
|
||||
}
|
||||
|
||||
/// Apply the hidden titlebar style.
|
||||
private func reapplyHiddenStyle() {
|
||||
styleMask = [
|
||||
private let hiddenStyleMask: NSWindow.StyleMask = [
|
||||
// We need `titled` in the mask to get the normal window frame
|
||||
.titled,
|
||||
|
||||
|
|
@ -34,6 +32,15 @@ class HiddenTitlebarTerminalWindow: TerminalWindow {
|
|||
.miniaturizable,
|
||||
]
|
||||
|
||||
/// Apply the hidden titlebar style.
|
||||
private func reapplyHiddenStyle() {
|
||||
// Apply our style mask while preserving the .fullScreen option
|
||||
if styleMask.contains(.fullScreen) {
|
||||
styleMask = hiddenStyleMask.union([.fullScreen])
|
||||
} else {
|
||||
styleMask = hiddenStyleMask
|
||||
}
|
||||
|
||||
// Hide the title
|
||||
titleVisibility = .hidden
|
||||
titlebarAppearsTransparent = true
|
||||
|
|
|
|||
Loading…
Reference in New Issue