]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commitdiff
macOS: Show Manage Tunnels window on startup
authorRoopesh Chander <roop@roopc.net>
Sun, 19 May 2019 19:54:43 +0000 (01:24 +0530)
committerRoopesh Chander <roop@roopc.net>
Mon, 20 May 2019 11:12:27 +0000 (16:42 +0530)
Signed-off-by: Roopesh Chander <roop@roopc.net>
WireGuard/WireGuard/UI/macOS/AppDelegate.swift

index d3e2c0a4a5698b6c5e5603a774b5b72c257ff38e..a68e08abaf4ad598467cc9f634dd4dd78ff10579 100644 (file)
@@ -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)
             }
         }
     }