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>
}
func applicationShouldTerminateAfterLastWindowClosed(_ application: NSApplication) -> Bool {
- setDockIconAndMainMenuVisibility(isVisible: false)
+ DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(200)) { [weak self] in
+ self?.setDockIconAndMainMenuVisibility(isVisible: false)
+ }
return false
}