Skip to content

Commit

Permalink
Don't show agent window, if no agent is available
Browse files Browse the repository at this point in the history
  • Loading branch information
Cosmo committed Sep 9, 2019
1 parent 263c5dc commit 46a49e2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Clippy macOS/AppDelegate.swift
Expand Up @@ -17,10 +17,13 @@ class AppDelegate: NSObject, NSApplicationDelegate {
var lastUsedAgent: String?

func applicationDidFinishLaunching(_ aNotification: Notification) {

window = AgentWindow(contentRect: CGRect.zero, styleMask: [], backing: .buffered, defer: true)
window?.title = applicationName
window?.contentViewController = AgentViewController()
window?.makeKeyAndOrderFront(self)
if !Agent.agentNames().isEmpty {
window?.makeKeyAndOrderFront(self)
}
window?.center()

setupStatusBar()
Expand Down

0 comments on commit 46a49e2

Please sign in to comment.