aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2019-05-20 01:24:43 +0530
committerRoopesh Chander <roop@roopc.net>2019-05-20 16:42:27 +0530
commit300268daa00ee84c49f7c1c9a9475daea01082c2 (patch)
tree2cc0c64ef4c6621e1f618f3f84059ca9b557a380
parentmacOS: Minor refactor of StatusMenuWindowDelegate (diff)
downloadwireguard-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.swift4
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)
}
}
}