         }
     }
     public var isFullscreen = false
-    
+
     private var reflowTimer: NSTimer?
     private var reflowOperation: ReflowOperation?
-    
+
     private var layouts: [Layout] = []
     private var currentLayoutIndexBySpaceIdentifier: [String: Int] = [:]
     private var layoutsBySpaceIdentifier: [String: [Layout]] = [:]

            }
        }
    }
    
    private func reflow(change: WindowChange) {
        guard currentSpaceIdentifier != nil &&
            currentLayoutIndex < layouts.count &&

    private var currentLayout: Layout {
        return layouts[currentLayoutIndex]
    }

    private let layoutNameWindowController: LayoutNameWindowController

    private var changingSpace: Bool = false

    init(screen: NSScreen, screenIdentifier: String, delegate: ScreenManagerDelegate, userConfiguration: UserConfiguration) {
        self.screen = screen
        self.screenIdentifier = screenIdentifier
        self.delegate = delegate
        self.userConfiguration = userConfiguration

        currentLayoutIndexBySpaceIdentifier = [:]
        layoutsBySpaceIdentifier = [:]
        currentLayoutIndex = 0

        layoutNameWindowController = LayoutNameWindowController(windowNibName: "LayoutNameWindow")

        super.init()

        layouts = LayoutManager.layoutsWithConfiguration(userConfiguration, windowActivityCache: self)
    }

    public func setNeedsReflowWithWindowChange(windowChange: WindowChange) {
        reflowOperation?.cancel()

        currentLayout.updateWithChange(windowChange)

        if changingSpace {
            // The 0.4 is disgustingly tied to the space change animation time.
            // This should get burned to the ground when space changes don't rely on the mouse click trick.
