Otherwise, the 'exiting with an active tunnel' alert could get queued up
to be shown after the current sheet is dismissed.
Signed-off-by: Roopesh Chander <roop@roopc.net>
}
@objc func quit() {
+ if let manageWindow = manageTunnelsWindowObject, manageWindow.attachedSheet != nil {
+ NSApp.activate(ignoringOtherApps: true)
+ manageWindow.orderFront(self)
+ return
+ }
registerLoginItem(shouldLaunchAtLogin: false)
guard let currentTunnel = tunnelsTracker?.currentTunnel, currentTunnel.status == .active || currentTunnel.status == .activating else {
NSApp.terminate(nil)