diff --git a/macos/Sources/Ghostty/Surface View/OSSurfaceView.swift b/macos/Sources/Ghostty/Surface View/OSSurfaceView.swift index d2fbae28d..628869f8b 100644 --- a/macos/Sources/Ghostty/Surface View/OSSurfaceView.swift +++ b/macos/Sources/Ghostty/Surface View/OSSurfaceView.swift @@ -38,6 +38,10 @@ extension Ghostty { // on supported platforms. @Published var focusInstant: ContinuousClock.Instant? + // Returns sizing information for the surface. This is the raw C + // structure because I'm lazy. + @Published var surfaceSize: ghostty_surface_size_s? + 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 30f1ce4a6..9b81e1e39 100644 --- a/macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift +++ b/macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift @@ -76,10 +76,6 @@ extension Ghostty { // Cancellable for search state needle changes private var searchNeedleCancellable: AnyCancellable? - // Returns sizing information for the surface. This is the raw C - // structure because I'm lazy. - @Published var surfaceSize: ghostty_surface_size_s? - // Whether the pointer should be visible or not @Published private(set) var pointerStyle: CursorStyle = .horizontalText diff --git a/macos/Sources/Ghostty/Surface View/SurfaceView_UIKit.swift b/macos/Sources/Ghostty/Surface View/SurfaceView_UIKit.swift index 6de1b658b..e448b59e3 100644 --- a/macos/Sources/Ghostty/Surface View/SurfaceView_UIKit.swift +++ b/macos/Sources/Ghostty/Surface View/SurfaceView_UIKit.swift @@ -20,13 +20,6 @@ extension Ghostty { /// True when the surface should show a highlight effect (e.g., when presented via goto_split). @Published private(set) var highlighted: Bool = false - // Returns sizing information for the surface. This is the raw C - // structure because I'm lazy. - var surfaceSize: ghostty_surface_size_s? { - guard let surface = self.surface else { return nil } - return ghostty_surface_size(surface) - } - private(set) var surface: ghostty_surface_t? init(_ app: ghostty_app_t, baseConfig: SurfaceConfiguration? = nil, uuid: UUID? = nil) {