From 5a026cf1a2ed063dcab4b9e8e08ea657c578b66b Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 7 Jun 2024 12:35:57 -0700 Subject: [PATCH] macos: set background color on transparency that matches Terminal.app --- macos/Sources/Features/Terminal/TerminalController.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/macos/Sources/Features/Terminal/TerminalController.swift b/macos/Sources/Features/Terminal/TerminalController.swift index b25d0641d..dae31a7c3 100644 --- a/macos/Sources/Features/Terminal/TerminalController.swift +++ b/macos/Sources/Features/Terminal/TerminalController.swift @@ -187,7 +187,12 @@ class TerminalController: NSWindowController, NSWindowDelegate, if (ghostty.config.backgroundOpacity < 1) { window.isOpaque = false window.hasShadow = false - window.backgroundColor = .clear + + // This is weird, but we don't use ".clear" because this creates a look that + // matches Terminal.app much more closer. This lets users transition from + // Terminal.app more easily. + window.backgroundColor = .white.withAlphaComponent(0.001) + ghostty_set_window_background_blur(ghostty.app, Unmanaged.passUnretained(window).toOpaque()) } else { window.isOpaque = true