Switch
Switch copied to clipboard
Isolate dependance on NSScreen
Switch's model objects call out to NSScreen a lot to accomplish such things as figuring out their non-flipped geometry and grouping by Space, and the dependency is inherently mutable and unsafe. Window objects should fetch screen layout information and store it along with the rest of their immutable data. This will make it much easier to test things in the future.
The real problem here is that isolation will introduce an effective cache that needs to be invalidated (reflowing the interface) on display layout changes.