macos: don't overwrite the .fullScreen styleMask option in reapplyHiddenStyle
parent
66f73f7133
commit
b1f788a768
|
|
@ -19,20 +19,27 @@ class HiddenTitlebarTerminalWindow: TerminalWindow {
|
||||||
NotificationCenter.default.removeObserver(self)
|
NotificationCenter.default.removeObserver(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private 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.
|
/// Apply the hidden titlebar style.
|
||||||
private func reapplyHiddenStyle() {
|
private func reapplyHiddenStyle() {
|
||||||
styleMask = [
|
// Apply our style mask while preserving the .fullScreen option
|
||||||
// We need `titled` in the mask to get the normal window frame
|
if styleMask.contains(.fullScreen) {
|
||||||
.titled,
|
styleMask = hiddenStyleMask.union([.fullScreen])
|
||||||
|
} else {
|
||||||
// Full size content view so we can extend
|
styleMask = hiddenStyleMask
|
||||||
// content in to the hidden titlebar's area
|
}
|
||||||
.fullSizeContentView,
|
|
||||||
|
|
||||||
.resizable,
|
|
||||||
.closable,
|
|
||||||
.miniaturizable,
|
|
||||||
]
|
|
||||||
|
|
||||||
// Hide the title
|
// Hide the title
|
||||||
titleVisibility = .hidden
|
titleVisibility = .hidden
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue