macos: quick terminal always brings Ghostty to the front

This commit is contained in:
Mitchell Hashimoto
2024-09-29 09:31:48 -07:00
parent c2fe2ccc71
commit e47e7a8b8b

View File

@ -136,6 +136,12 @@ class QuickTerminalController: BaseTerminalController {
private func animateWindowIn(window: NSWindow, from position: QuickTerminalPosition) { private func animateWindowIn(window: NSWindow, from position: QuickTerminalPosition) {
guard let screen = ghostty.config.quickTerminalScreen.screen else { return } guard let screen = ghostty.config.quickTerminalScreen.screen else { return }
// If our application is not active, then we grab focus. The quick terminal
// always grabs focus.
if !NSApp.isActive {
NSApp.activate(ignoringOtherApps: true)
}
// Move our window off screen to the top // Move our window off screen to the top
position.setInitial(in: window, on: screen) position.setInitial(in: window, on: screen)