updates to launcer

This commit is contained in:
Mark Gregory
2026-10-23 09:50:39 +01:00
parent e77549c652
commit b5fdfe5809
16 changed files with 584 additions and 1026 deletions
+13 -1
View File
@@ -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)
}
}
}
}