From 37db4578c8563dc7a744ec028a17c6635ab39e5f Mon Sep 17 00:00:00 2001 From: Soh Satoh <20023945+sohsatoh@users.noreply.github.com> Date: Wed, 1 Jan 2025 07:30:46 +0900 Subject: [PATCH] Fix the issue that the quick term not shown on first call --- .../Features/QuickTerminal/QuickTerminalController.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/macos/Sources/Features/QuickTerminal/QuickTerminalController.swift b/macos/Sources/Features/QuickTerminal/QuickTerminalController.swift index 4063aa26f..2a4137dc9 100644 --- a/macos/Sources/Features/QuickTerminal/QuickTerminalController.swift +++ b/macos/Sources/Features/QuickTerminal/QuickTerminalController.swift @@ -166,7 +166,9 @@ class QuickTerminalController: BaseTerminalController { func toggle() { if derivedConfig.quickTerminalSpaceBehavior == .remain && self.window?.isOnActiveSpace == false { // If we're in the remain mode and the window is not on the active space, then we bring the window back to the active space. - self.window?.makeKeyAndOrderFront(nil) + DispatchQueue.main.async { + self.window?.makeKeyAndOrderFront(nil) + } return } @@ -239,7 +241,9 @@ class QuickTerminalController: BaseTerminalController { position.setInitial(in: window, on: screen) // Move it to the visible position since animation requires this - window.makeKeyAndOrderFront(nil) + DispatchQueue.main.async { + window.makeKeyAndOrderFront(nil) + } // Run the animation that moves our window into the proper place and makes // it visible.