macos: order main window front on restore

This commit is contained in:
Mitchell Hashimoto
2024-01-03 12:10:52 -08:00
parent c9ff034b62
commit f93c41669e

View File

@ -125,6 +125,13 @@ class TerminalWindowRestoration: NSObject, NSWindowRestoration {
guard viewWindow == inWindow else { return }
inWindow.makeFirstResponder(to)
// If the window is main, then we also make sure it comes forward. This
// prevents a bug found in #1177 where sometimes on restore the windows
// would be behind other applications.
if (viewWindow.isMainWindow) {
viewWindow.orderFront(nil)
}
}
}
}