macOS: move surfaceSize to OSSurfaceView

This commit is contained in:
Lukas
2026-04-12 12:08:56 +02:00
parent 7c83561f9e
commit 3834751aef
3 changed files with 4 additions and 11 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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) {