macOS: Bring app to front before 'exiting with an active tunnel' alert
This commit is contained in:
parent
b5025b51cd
commit
d04ce0e15f
|
@ -57,8 +57,10 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
|||
let alert = NSAlert()
|
||||
alert.messageText = tr("macAppExitingWithActiveTunnelMessage")
|
||||
alert.informativeText = tr("macAppExitingWithActiveTunnelInfo")
|
||||
if let window = manageTunnelsWindowObject {
|
||||
alert.beginSheetModal(for: window) { _ in
|
||||
NSApp.activate(ignoringOtherApps: true)
|
||||
if let manageWindow = manageTunnelsWindowObject {
|
||||
manageWindow.orderFront(self)
|
||||
alert.beginSheetModal(for: manageWindow) { _ in
|
||||
NSApp.terminate(nil)
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue