Now the search doesn't appear when launched by 'start at login'.
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user