From: Roopesh Chander Date: Sun, 19 May 2019 19:54:43 +0000 (+0530) Subject: macOS: Show Manage Tunnels window on startup X-Git-Tag: 0.0.20190531-9~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=300268daa00ee84c49f7c1c9a9475daea01082c2;p=thirdparty%2Fwireguard-apple.git macOS: Show Manage Tunnels window on startup Signed-off-by: Roopesh Chander --- diff --git a/WireGuard/WireGuard/UI/macOS/AppDelegate.swift b/WireGuard/WireGuard/UI/macOS/AppDelegate.swift index d3e2c0a..a68e08a 100644 --- a/WireGuard/WireGuard/UI/macOS/AppDelegate.swift +++ b/WireGuard/WireGuard/UI/macOS/AppDelegate.swift @@ -17,6 +17,8 @@ class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching(_ aNotification: Notification) { Logger.configureGlobal(tagged: "APP", withFilePath: FileManager.logFileURL?.path) registerLoginItem(shouldLaunchAtLogin: true) + + NSApp.setActivationPolicy(.regular) NSApp.mainMenu = MainMenu() TunnelsManager.create { [weak self] result in @@ -39,6 +41,8 @@ class AppDelegate: NSObject, NSApplicationDelegate { self.tunnelsManager = tunnelsManager self.tunnelsTracker = tunnelsTracker self.statusItemController = statusItemController + + self.showManageTunnelsWindow(completion: nil) } } }