From 86009545260c2d3609d52a40e7ed44e716ba11a1 Mon Sep 17 00:00:00 2001 From: Lars <134181853+bo2themax@users.noreply.github.com> Date: Mon, 22 Sep 2025 14:52:10 +0200 Subject: [PATCH] Workaround for #8669 --- macos/Sources/Features/App Intents/NewTerminalIntent.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/macos/Sources/Features/App Intents/NewTerminalIntent.swift b/macos/Sources/Features/App Intents/NewTerminalIntent.swift index f7242ee56..6e679673f 100644 --- a/macos/Sources/Features/App Intents/NewTerminalIntent.swift +++ b/macos/Sources/Features/App Intents/NewTerminalIntent.swift @@ -43,11 +43,13 @@ struct NewTerminalIntent: AppIntent { ) var parent: TerminalEntity? + // Performing in the background can avoid opening multiple windows at the same time + // using `foreground` will cause `perform` and `AppDelegate.applicationDidBecomeActive(_:)`/`AppDelegate.applicationShouldHandleReopen(_:hasVisibleWindows:)` running at the 'same' time @available(macOS 26.0, *) - static var supportedModes: IntentModes = .foreground(.immediate) + static var supportedModes: IntentModes = .background @available(macOS, obsoleted: 26.0, message: "Replaced by supportedModes") - static var openAppWhenRun = true + static var openAppWhenRun = false @MainActor func perform() async throws -> some IntentResult & ReturnsValue {