mirror of
https://github.com/passepartoutvpn/wireguard-apple.git
synced 2025-02-16 04:42:07 +00:00
macOS: Fix residual menu highlight on reopen
If we close the window with Cmd+W or Cmd+Q and then re-launch the app, the main menu shows residual highlight from the close action. This commit fixes that. Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
parent
5100e597aa
commit
a18614d6b3
@ -135,7 +135,9 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
}
|
||||
|
||||
func applicationShouldTerminateAfterLastWindowClosed(_ application: NSApplication) -> Bool {
|
||||
setDockIconAndMainMenuVisibility(isVisible: false)
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(200)) { [weak self] in
|
||||
self?.setDockIconAndMainMenuVisibility(isVisible: false)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user