From 3936069297ac2e7a2f4e2508bdbe6da735425f7d Mon Sep 17 00:00:00 2001 From: Lukas <134181853+bo2themax@users.noreply.github.com> Date: Sun, 12 Apr 2026 11:59:04 +0200 Subject: [PATCH] macOS: move `healthy` and `error` to `OSSurfaceView` --- macos/Sources/Ghostty/Surface View/OSSurfaceView.swift | 7 +++++++ .../Sources/Ghostty/Surface View/SurfaceView_AppKit.swift | 7 ------- macos/Sources/Ghostty/Surface View/SurfaceView_UIKit.swift | 7 ------- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/macos/Sources/Ghostty/Surface View/OSSurfaceView.swift b/macos/Sources/Ghostty/Surface View/OSSurfaceView.swift index ad979fa55..326b52ca6 100644 --- a/macos/Sources/Ghostty/Surface View/OSSurfaceView.swift +++ b/macos/Sources/Ghostty/Surface View/OSSurfaceView.swift @@ -18,6 +18,13 @@ extension Ghostty { // resized in discrete steps of a single cell. @Published var cellSize: CGSize = .zero + // The health state of the surface. This currently only reflects the + // renderer health. In the future we may want to make this an enum. + @Published var healthy: Bool = true + + // Any error while initializing the surface. + @Published var error: Error? + init(id: UUID?, frame: CGRect) { self.id = id ?? UUID() super.init(frame: frame) diff --git a/macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift b/macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift index 412cb6f5e..c62a13c92 100644 --- a/macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift +++ b/macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift @@ -21,13 +21,6 @@ extension Ghostty { } } - // The health state of the surface. This currently only reflects the - // renderer health. In the future we may want to make this an enum. - @Published var healthy: Bool = true - - // Any error while initializing the surface. - @Published var error: Error? - // The hovered URL string @Published var hoverUrl: String? diff --git a/macos/Sources/Ghostty/Surface View/SurfaceView_UIKit.swift b/macos/Sources/Ghostty/Surface View/SurfaceView_UIKit.swift index 71ac301e0..56a1cf039 100644 --- a/macos/Sources/Ghostty/Surface View/SurfaceView_UIKit.swift +++ b/macos/Sources/Ghostty/Surface View/SurfaceView_UIKit.swift @@ -9,13 +9,6 @@ extension Ghostty { // to the app level and it is set from there. @Published var title: String = "👻" - // The health state of the surface. This currently only reflects the - // renderer health. In the future we may want to make this an enum. - @Published var healthy: Bool = true - - // Any error while initializing the surface. - @Published var error: Error? - // The hovered URL @Published var hoverUrl: String?