diff --git a/macos/Sources/Ghostty/Surface View/OSSurfaceView.swift b/macos/Sources/Ghostty/Surface View/OSSurfaceView.swift index de71dc997..0a26425a6 100644 --- a/macos/Sources/Ghostty/Surface View/OSSurfaceView.swift +++ b/macos/Sources/Ghostty/Surface View/OSSurfaceView.swift @@ -91,6 +91,12 @@ extension Ghostty { self?.highlighted = false } } + + // MARK: - Placeholders + + func focusDidChange(_ focused: Bool) {} + + func sizeDidChange(_ size: CGSize) {} } } diff --git a/macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift b/macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift index db8f02494..ce754db9e 100644 --- a/macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift +++ b/macos/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift @@ -389,7 +389,7 @@ extension Ghostty { progressReportTimer?.invalidate() } - func focusDidChange(_ focused: Bool) { + override func focusDidChange(_ focused: Bool) { guard let surface = self.surface else { return } guard self.focused != focused else { return } self.focused = focused @@ -426,7 +426,7 @@ extension Ghostty { } } - func sizeDidChange(_ size: CGSize) { + override func sizeDidChange(_ size: CGSize) { // Ghostty wants to know the actual framebuffer size... It is very important // here that we use "size" and NOT the view frame. If we're in the middle of // an animation (i.e. a fullscreen animation), the frame will not yet be updated. diff --git a/macos/Sources/Ghostty/Surface View/SurfaceView_UIKit.swift b/macos/Sources/Ghostty/Surface View/SurfaceView_UIKit.swift index a4a643bb1..6c1480b4e 100644 --- a/macos/Sources/Ghostty/Surface View/SurfaceView_UIKit.swift +++ b/macos/Sources/Ghostty/Surface View/SurfaceView_UIKit.swift @@ -45,7 +45,7 @@ extension Ghostty { ghostty_surface_free(surface) } - func focusDidChange(_ focused: Bool) { + override func focusDidChange(_ focused: Bool) { guard let surface = self.surface else { return } ghostty_surface_set_focus(surface, focused) @@ -55,7 +55,7 @@ extension Ghostty { } } - func sizeDidChange(_ size: CGSize) { + override func sizeDidChange(_ size: CGSize) { guard let surface = self.surface else { return } // Ghostty wants to know the actual framebuffer size... It is very important