Add isOpen property to MainWindowController.

This commit is contained in:
Brent Simmons 2018-01-27 15:04:45 -08:00
parent c2afd03d8c
commit b32d45cd60
1 changed files with 6 additions and 2 deletions

View File

@ -14,6 +14,10 @@ private let kWindowFrameKey = "MainWindow"
class MainWindowController : NSWindowController, NSUserInterfaceValidations {
var isOpen: Bool {
return isWindowLoaded && window!.isVisible
}
// MARK: NSWindowController
private let windowAutosaveName = NSWindow.FrameAutosaveName(rawValue: kWindowFrameKey)