diff --git a/macos/Sources/Ghostty/SurfaceView.swift b/macos/Sources/Ghostty/SurfaceView.swift index 5cfd3b732..a00ff7ce9 100644 --- a/macos/Sources/Ghostty/SurfaceView.swift +++ b/macos/Sources/Ghostty/SurfaceView.swift @@ -52,8 +52,10 @@ extension Ghostty { // True if we're hovering over the left URL view, so we can show it on the right. @State private var isHoveringURLLeft: Bool = false + #if canImport(AppKit) // Observe SecureInput to detect when its enabled @ObservedObject private var secureInput = SecureInput.shared + #endif @EnvironmentObject private var ghostty: Ghostty.App @@ -200,6 +202,7 @@ extension Ghostty { } } + #if canImport(AppKit) // If we have secure input enabled and we're the focused surface and window // then we want to show the secure input overlay. if (secureInput.enabled && @@ -207,6 +210,7 @@ extension Ghostty { windowFocus) { SecureInputOverlay() } + #endif // If our surface is not healthy, then we render an error view over it. if (!surfaceView.healthy) {