diff --git a/Sources/AppDelegate.swift b/Sources/AppDelegate.swift index 5cf8caf..d13506c 100644 --- a/Sources/AppDelegate.swift +++ b/Sources/AppDelegate.swift @@ -36,6 +36,15 @@ final class AppDelegate: NSObject, NSApplicationDelegate { } } + // MARK: - NSApplicationDelegate + + /// Bugger is a menu-bar app: closing a window must not quit it, otherwise + /// polling and notifications would stop. Quit only via the Quit button + /// or Cmd+Q. + func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + false + } + private func setupStatusItem() { statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength) if let button = statusItem.button {