From 92e16ccbf7e4c2a9fd12a1e8fea0f10ddbf9109e Mon Sep 17 00:00:00 2001 From: Cameron Dart <8763518+SkamDart@users.noreply.github.com> Date: Mon, 10 Jun 2024 18:23:06 -0700 Subject: [PATCH] no early return --- macos/Sources/Ghostty/SurfaceView_AppKit.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/macos/Sources/Ghostty/SurfaceView_AppKit.swift b/macos/Sources/Ghostty/SurfaceView_AppKit.swift index 3c5cd71ef..9b78b868c 100644 --- a/macos/Sources/Ghostty/SurfaceView_AppKit.swift +++ b/macos/Sources/Ghostty/SurfaceView_AppKit.swift @@ -480,9 +480,10 @@ extension Ghostty { let pos = self.convert(event.locationInWindow, from: nil) ghostty_surface_mouse_pos(surface, pos.x, frame.height - pos.y) - guard let window = self.window as? TerminalWindow else { return } - if !self.focused && window.focusFollowsMouse { - Ghostty.moveFocus(to: self) + if let window = self.window as? TerminalWindow { + if !self.focused && window.focusFollowsMouse { + Ghostty.moveFocus(to: self) + } } }