From b2835f2f7d6a3e9d6d867cfba22e3cdc19421003 Mon Sep 17 00:00:00 2001 From: Lukas <134181853+bo2themax@users.noreply.github.com> Date: Sun, 3 May 2026 09:58:56 +0200 Subject: [PATCH] macOS: revert some changes --- macos/Sources/App/macOS/AppDelegate.swift | 4 +--- macos/Sources/Ghostty/Ghostty.Config.swift | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/macos/Sources/App/macOS/AppDelegate.swift b/macos/Sources/App/macOS/AppDelegate.swift index 56946eeaf..e84f19e32 100644 --- a/macos/Sources/App/macOS/AppDelegate.swift +++ b/macos/Sources/App/macOS/AppDelegate.swift @@ -620,10 +620,8 @@ class AppDelegate: NSObject, return event } - @MainActor @objc private func windowDidBecomeKey(_ notification: Notification) { - let window = notification.object as? NSWindow - syncFloatOnTopMenu(window) + syncFloatOnTopMenu(notification.object as? NSWindow) } @objc private func quickTerminalDidChangeVisibility(_ notification: Notification) { diff --git a/macos/Sources/Ghostty/Ghostty.Config.swift b/macos/Sources/Ghostty/Ghostty.Config.swift index 18d767207..9b094f21c 100644 --- a/macos/Sources/Ghostty/Ghostty.Config.swift +++ b/macos/Sources/Ghostty/Ghostty.Config.swift @@ -116,8 +116,8 @@ extension Ghostty { /// configuration would be "quit" action. /// /// Returns nil if there is no key equivalent for the given action. - func keyboardShortcut(for action: String?) -> KeyboardShortcut? { - guard let action, let cfg = self.config else { return nil } + func keyboardShortcut(for action: String) -> KeyboardShortcut? { + guard let cfg = self.config else { return nil } let trigger = ghostty_config_trigger(cfg, action, UInt(action.lengthOfBytes(using: .utf8))) return Ghostty.keyboardShortcut(for: trigger)