Now the search doesn't appear when launched by 'start at login'.

This commit is contained in:
2025-03-17 18:18:58 -07:00
parent 4d681ac116
commit 1a3e52efc8

View File

@@ -15,7 +15,12 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSWindowDelegate {
window.delegate = self window.delegate = self
window.makeKeyAndOrderFront(nil) // NOTE: Here we check wether the program was launched by the system. If it was not, then display the window.
if let event = NSAppleEventManager.shared().currentAppleEvent,
!(event.eventID == kAEOpenApplication && event.paramDescriptor(forKeyword: keyAEPropData)?.enumCodeValue == keyAELaunchedAsLogInItem)
{
window.makeKeyAndOrderFront(nil)
}
HotKeyManager.shared.handler = { (inHandlerCallRef, inEvent, inUserData) -> OSStatus in HotKeyManager.shared.handler = { (inHandlerCallRef, inEvent, inUserData) -> OSStatus in
if let delegate = NSApplication.shared.delegate as? AppDelegate { if let delegate = NSApplication.shared.delegate as? AppDelegate {