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