mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-06-28 10:18:42 +03:00
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:
@ -449,15 +449,16 @@ 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 }
|
|
||||||
|
|
||||||
// Set the window transparency settings
|
if ghostty_surface_transparent(surface) {
|
||||||
window.isOpaque = false
|
// Set the window transparency settings
|
||||||
window.hasShadow = false
|
window.isOpaque = false
|
||||||
window.backgroundColor = .clear
|
window.hasShadow = false
|
||||||
|
window.backgroundColor = .clear
|
||||||
|
|
||||||
// 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()
|
||||||
|
Reference in New Issue
Block a user