diff options
author | Roopesh Chander <roop@roopc.net> | 2019-05-20 01:24:43 +0530 |
---|---|---|
committer | Roopesh Chander <roop@roopc.net> | 2019-05-20 16:42:27 +0530 |
commit | 300268daa00ee84c49f7c1c9a9475daea01082c2 (patch) | |
tree | 2cc0c64ef4c6621e1f618f3f84059ca9b557a380 | |
parent | macOS: Minor refactor of StatusMenuWindowDelegate (diff) | |
download | wireguard-apple-300268daa00ee84c49f7c1c9a9475daea01082c2.tar.xz wireguard-apple-300268daa00ee84c49f7c1c9a9475daea01082c2.zip |
macOS: Show Manage Tunnels window on startup
Signed-off-by: Roopesh Chander <roop@roopc.net>
-rw-r--r-- | WireGuard/WireGuard/UI/macOS/AppDelegate.swift | 4 |
1 files changed, 4 insertions, 0 deletions
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) } } } |