diff --git a/ClashX/ClashWindowController.swift b/ClashX/ClashWindowController.swift index a983af73f..ffc9d66c1 100644 --- a/ClashX/ClashWindowController.swift +++ b/ClashX/ClashWindowController.swift @@ -71,6 +71,8 @@ class ClashWindowController: NSWindowController, NSWindowDe } window?.makeKeyAndOrderFront(self) window?.delegate = self + NSApp.activate(ignoringOtherApps: true) + window?.makeKeyAndOrderFront(nil) } func windowWillClose(_ notification: Notification) {