updates to launcer
This commit is contained in:
@@ -309,8 +309,20 @@ struct OrionMenuView: View {
|
||||
}
|
||||
|
||||
private func showSettings() {
|
||||
// Activate before opening the Settings scene so it is not left behind
|
||||
// the menu-bar popover or another application.
|
||||
NSApp.activate(ignoringOtherApps: true)
|
||||
openSettings()
|
||||
NSApplication.shared.activate(ignoringOtherApps: true)
|
||||
// The Settings window is created asynchronously by SwiftUI.
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {
|
||||
NSApp.activate(ignoringOtherApps: true)
|
||||
if let window = NSApp.windows.first(where: {
|
||||
$0.title.localizedCaseInsensitiveContains("settings") &&
|
||||
$0.canBecomeKey
|
||||
}) {
|
||||
window.makeKeyAndOrderFront(nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user