                 }
                 windowManager.addWindow(window)
             }
+
             application.observeNotification(kAXFocusedWindowChangedNotification as CFString!, with: application) { _ in
                 guard let focusedWindow = SIWindow.focused(), let screen = focusedWindow.screen() else {
                     return

        let application = self.application
        let windowManager = self.windowManager

        var mouseState: MouseState = .pointing
        let mouseEventsToWatch: NSEvent.EventTypeMask = [.leftMouseDown, .leftMouseUp, .leftMouseDragged]

        NSEvent.addGlobalMonitorForEvents(matching: mouseEventsToWatch) { anEvent in
            switch anEvent.type {
            case .leftMouseDown:
                mouseState = .clicking
            case .leftMouseDragged:
                switch mouseState {
                case .moving, .resizing:
                    () // ignore - we have what we need
                default:
                    mouseState = .dragging
                }

            case .leftMouseUp:
                switch mouseState {
                case .clicking:
                    mouseState = .pointing
                case .pointing:
                    mouseState = .pointing
                case .dragging:
                    // assume window move event will come shortly after
                    mouseState = .doneDragging(atTime: NSDate())
                case let .moving(draggedWindow):
                    self.swapDraggedWindowWithDropzone(draggedWindow)
                    mouseState = .pointing
                case let .resizing(resizedWindow):
                    mouseState = .pointing
                case .doneDragging:
                    mouseState = .doneDragging(atTime: NSDate()) // reset the clock I guess
                }

            default: ()

                    return
                }

                switch self.mouse.state {
                case .dragging:
                    // record window and wait for mouse up
                    self.mouse.state = .moving(window: movedWindow)
                case let .doneDragging(lmbUpMoment):
                    // if mouse button recently came up, assume window move is related
                    let dragEndInterval = NSDate().timeIntervalSince(lmbUpMoment as Date)
                    if dragEndInterval < mouseDragRaceThresholdSeconds {
                        self.mouse.state = .pointing // flip state first to prevent race condition
                        self.swapDraggedWindowWithDropzone(movedWindow)
                    }
                default: ()
                }
