         else {
             return
         }
-        
+
         let windows = delegate.activeWindowsForScreenManager(self)
         changingSpace = false
         reflowOperation = currentLayout.reflowOperationForScreen(screen, withWindows: windows)
         NSOperationQueue.mainQueue().addOperation(reflowOperation!)
     }
-    
+
     public func updateCurrentLayout(updater: (Layout) -> ()) {
         updater(currentLayout)
         setNeedsReflowWithWindowChange(.Unknown)
     }
-    
+
     public func cycleLayoutForward() {
         currentLayoutIndex = (currentLayoutIndex + 1) % layouts.count
         setNeedsReflowWithWindowChange(.Unknown)
     }
-    
+
     public func cycleLayoutBackward() {
         currentLayoutIndex = (currentLayoutIndex == 0 ? layouts.count : currentLayoutIndex) - 1
         setNeedsReflowWithWindowChange(.Unknown)
     }
-    
+
     public func selectLayout(layoutType: AnyClass) {
         let index = layouts.indexOf { $0.isKindOfClass(layoutType) }
         guard let layoutIndex = index else {
             return
         }
-        
+
         currentLayoutIndex = layoutIndex
         setNeedsReflowWithWindowChange(.Unknown)
     }
-    
+
     public func shrinkMainPane() {
         currentLayout.shrinkMainPane()
     }
-    
+
     public func expandMainPane() {
         currentLayout.expandMainPane()
     }
-    
+
     public func nextWindowIDCounterClockwise() -> CGWindowID? {
         return currentLayout.nextWindowIDCounterClockwise()
     }
-    
+
     public func nextWindowIDClockwise() -> CGWindowID? {
         return currentLayout.nextWindowIDClockwise()
     }
-    
+
     public func displayLayoutHUD() {
         guard userConfiguration.enablesLayoutHUD() else {
             return
         }
-        
+
         defer {
             NSObject.cancelPreviousPerformRequestsWithTarget(self, selector: #selector(hideLayoutHUD(_:)), object: nil)
             performSelector(#selector(hideLayoutHUD(_:)), withObject: nil, afterDelay: 0.6)
         }
-        
+
         guard let layoutNameWindow = layoutNameWindowController.window as? LayoutNameWindow else {
             return
         }
-        
+
         let screenFrame = screen.frame
         let screenCenter = CGPoint(x: screenFrame.midX, y: screenFrame.midY)
         let windowOrigin = CGPoint(
             x: screenCenter.x - layoutNameWindow.frame.width / 2.0,
             y: screenCenter.y - layoutNameWindow.frame.height / 2.0
         )
-        
+
         layoutNameWindow.layoutNameField?.stringValue = currentLayout.dynamicType.layoutName
         layoutNameWindow.setFrameOrigin(NSPointFromCGPoint(windowOrigin))
-        
+
         layoutNameWindowController.showWindow(self)
     }
-    
+
     public func hideLayoutHUD(sender: AnyObject) {
         layoutNameWindowController.close()
     }

    public func activeWindowsForScreenManager(screenManager: ScreenManager) -> [SIWindow] {
        return activeWindowsForScreen(screenManager.screen)
    }
    
    public func windowIsActive(window: SIWindow) -> Bool {
        if !window.isActive() {
            return false

        }
    }
    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]] = [:]
