From c6ce9aea4a169a1b81557fafb113155eb1c58da4 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 3 Nov 2023 09:06:17 -0700 Subject: [PATCH] macos: do not set window initial size if fullscreen Fixes #798 --- macos/Sources/Ghostty/SurfaceView.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/macos/Sources/Ghostty/SurfaceView.swift b/macos/Sources/Ghostty/SurfaceView.swift index 818520aa3..2f491ae5e 100644 --- a/macos/Sources/Ghostty/SurfaceView.swift +++ b/macos/Sources/Ghostty/SurfaceView.swift @@ -510,6 +510,9 @@ extension Ghostty { guard let windowController = windowControllerRaw as? TerminalController else { return } guard case .noSplit = windowController.surfaceTree else { return } + // If our window is full screen, we do not set the frame + guard !window.styleMask.contains(.fullScreen) else { return } + // Setup our frame. We need to first subtract the views frame so that we can // just get the chrome frame so that we only affect the surface view size. var frame = window.frame