From 0e482b8519fe7ca55c75b43eef514694568dd51f Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 10 Feb 2024 07:52:02 -0800 Subject: [PATCH] macos: nitpicks --- macos/Ghostty.xcodeproj/project.pbxproj | 10 +++++----- macos/Sources/App/macOS/Ghostty-Bridging-Header.h | 5 ----- macos/Sources/App/macOS/ghostty-bridging-header.h | 3 +++ macos/Sources/Features/Terminal/TerminalWindow.swift | 4 +--- 4 files changed, 9 insertions(+), 13 deletions(-) delete mode 100644 macos/Sources/App/macOS/Ghostty-Bridging-Header.h create mode 100644 macos/Sources/App/macOS/ghostty-bridging-header.h diff --git a/macos/Ghostty.xcodeproj/project.pbxproj b/macos/Ghostty.xcodeproj/project.pbxproj index 583313b92..b33d9b472 100644 --- a/macos/Ghostty.xcodeproj/project.pbxproj +++ b/macos/Ghostty.xcodeproj/project.pbxproj @@ -133,7 +133,7 @@ C1F26EA62B738B9900404083 /* NSView+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSView+Extension.swift"; sourceTree = ""; }; C1F26EE72B76CBFC00404083 /* TerminalWindowButtonsBackdropOverlayLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TerminalWindowButtonsBackdropOverlayLayer.h; sourceTree = ""; }; C1F26EE82B76CBFC00404083 /* TerminalWindowButtonsBackdropOverlayLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TerminalWindowButtonsBackdropOverlayLayer.m; sourceTree = ""; }; - C1F26EEA2B76CC2400404083 /* Ghostty-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Ghostty-Bridging-Header.h"; sourceTree = ""; }; + C1F26EEA2B76CC2400404083 /* ghostty-bridging-header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ghostty-bridging-header.h"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -239,7 +239,7 @@ A5FEB2FF2ABB69450068369E /* main.swift */, A53426342A7DA53D00EBB7A2 /* AppDelegate.swift */, 857F63802A5E64F200CA4815 /* MainMenu.xib */, - C1F26EEA2B76CC2400404083 /* Ghostty-Bridging-Header.h */, + C1F26EEA2B76CC2400404083 /* ghostty-bridging-header.h */, ); path = macOS; sourceTree = ""; @@ -622,7 +622,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.mitchellh.ghostty; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_OBJC_BRIDGING_HEADER = "Sources/App/macOS/Ghostty-Bridging-Header.h"; + SWIFT_OBJC_BRIDGING_HEADER = "Sources/App/macOS/ghostty-bridging-header.h"; SWIFT_VERSION = 5.0; }; name = ReleaseLocal; @@ -772,7 +772,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.mitchellh.ghostty; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_OBJC_BRIDGING_HEADER = "Sources/App/macOS/Ghostty-Bridging-Header.h"; + SWIFT_OBJC_BRIDGING_HEADER = "Sources/App/macOS/ghostty-bridging-header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; }; @@ -811,7 +811,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.mitchellh.ghostty; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_OBJC_BRIDGING_HEADER = "Sources/App/macOS/Ghostty-Bridging-Header.h"; + SWIFT_OBJC_BRIDGING_HEADER = "Sources/App/macOS/ghostty-bridging-header.h"; SWIFT_VERSION = 5.0; }; name = Release; diff --git a/macos/Sources/App/macOS/Ghostty-Bridging-Header.h b/macos/Sources/App/macOS/Ghostty-Bridging-Header.h deleted file mode 100644 index 0b15a518e..000000000 --- a/macos/Sources/App/macOS/Ghostty-Bridging-Header.h +++ /dev/null @@ -1,5 +0,0 @@ -// -// Use this file to import your target's public headers that you would like to expose to Swift. -// - -#import "TerminalWindowButtonsBackdropOverlayLayer.h" diff --git a/macos/Sources/App/macOS/ghostty-bridging-header.h b/macos/Sources/App/macOS/ghostty-bridging-header.h new file mode 100644 index 000000000..6d2ccfaf3 --- /dev/null +++ b/macos/Sources/App/macOS/ghostty-bridging-header.h @@ -0,0 +1,3 @@ +// C imports here are exposed to Swift. + +#import "TerminalWindowButtonsBackdropOverlayLayer.h" diff --git a/macos/Sources/Features/Terminal/TerminalWindow.swift b/macos/Sources/Features/Terminal/TerminalWindow.swift index 4cb75bd99..f3f9bd4ed 100644 --- a/macos/Sources/Features/Terminal/TerminalWindow.swift +++ b/macos/Sources/Features/Terminal/TerminalWindow.swift @@ -206,9 +206,7 @@ class TerminalWindow: NSWindow { // as that of the active tab (i.e. the titlebar's background color), otherwise we make it the same // color as the background of unselected tabs. if let index = windowController?.window?.tabbedWindows?.firstIndex(of: self) { - let firstTabIsSelected = index == 0 - - windowButtonsBackdrop?.isHighlighted = firstTabIsSelected + windowButtonsBackdrop?.isHighlighted = index == 0 } // Color the new tab button's image to match the color of the tab title/keyboard shortcut labels,