macOS: Get the app back in focus after macOS' VPN prompt

This commit is contained in:
Roopesh Chander 2019-01-09 03:04:41 +05:30
parent f68648f874
commit d681e70ce5
1 changed files with 4 additions and 0 deletions

View File

@ -234,6 +234,10 @@ extension TunnelsListTableViewController {
if tunnelsManager.numberOfTunnels() == 1 {
selectTunnel(at: 0)
}
if !NSApp.isActive {
// macOS's VPN prompt might have caused us to lose focus
NSApp.activate(ignoringOtherApps: true)
}
}
func tunnelModified(at index: Int) {