I have the following simple code:
import SwiftUI
@main
struct League_Mouse_LockerApp: App {
var body: some Scene {
Settings {
SettingsView()
}
MenuBarExtra("My App", systemImage: "computermouse") {
SettingsLink()
Button("Quit") {
NSApplication.shared.terminate(nil)
}
}
}
}
When I launch the app and click Settings...
the window shows up.
If I click the red X button and then click Settings...
again, the window shows up.
If I click outside of the app window (and bring another app in front of it), and click Settings...
again, it does not show up, because it is not being brought to the front.
How do I resolve this?
I’ve no clue what to try.
New contributor
kejedi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.