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

Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
Roopesh Chander 2019-01-09 03:04:41 +05:30
parent e0af06844d
commit bc8ea55023
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) {