numist / Switch

A window-based context switcher for the Mac
157 stars 17 forks source link

Isolate dependance on NSScreen #107

Open numist opened 9 years ago

numist commented 9 years ago

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.

numist commented 3 years ago

The real problem here is that isolation will introduce an effective cache that needs to be invalidated (reflowing the interface) on display layout changes.