Fix the issue that the quick term not shown on first call

This commit is contained in:
Soh Satoh
2025-01-01 07:30:46 +09:00
committed by Mitchell Hashimoto
parent 0ddc1a21a6
commit 37db4578c8

View File

@ -166,7 +166,9 @@ class QuickTerminalController: BaseTerminalController {
func toggle() { func toggle() {
if derivedConfig.quickTerminalSpaceBehavior == .remain && self.window?.isOnActiveSpace == false { 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. // 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 return
} }
@ -239,7 +241,9 @@ class QuickTerminalController: BaseTerminalController {
position.setInitial(in: window, on: screen) position.setInitial(in: window, on: screen)
// Move it to the visible position since animation requires this // 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 // Run the animation that moves our window into the proper place and makes
// it visible. // it visible.