macos: always apply initial size to new windows

We would previously exit early for non-transparent windows, which
skipped the call to setInitialWindowSize().
This commit is contained in:
Jon Parise
2023-10-21 08:08:54 -07:00
parent a44e5a9ae4
commit d63c0df582

View File

@ -449,8 +449,8 @@ extension Ghostty {
override func viewDidMoveToWindow() { override func viewDidMoveToWindow() {
guard let window = self.window else { return } guard let window = self.window else { return }
guard let surface = self.surface else { return } guard let surface = self.surface else { return }
guard ghostty_surface_transparent(surface) else { return }
if ghostty_surface_transparent(surface) {
// Set the window transparency settings // Set the window transparency settings
window.isOpaque = false window.isOpaque = false
window.hasShadow = false window.hasShadow = false
@ -458,6 +458,7 @@ extension Ghostty {
// If we have a blur, set the blur // If we have a blur, set the blur
ghostty_set_window_background_blur(surface, Unmanaged.passUnretained(window).toOpaque()) ghostty_set_window_background_blur(surface, Unmanaged.passUnretained(window).toOpaque())
}
// Try to set the initial window size if we have one // Try to set the initial window size if we have one
setInitialWindowSize() setInitialWindowSize()