From 300268daa00ee84c49f7c1c9a9475daea01082c2 Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Mon, 20 May 2019 01:24:43 +0530 Subject: [PATCH] macOS: Show Manage Tunnels window on startup Signed-off-by: Roopesh Chander --- WireGuard/WireGuard/UI/macOS/AppDelegate.swift | 4 ++++ 1 file changed, 4 insertions(+) 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) } } }