tmandry / Swindler

macOS window management library for Swift
https://tmandry.github.io/Swindler/docs/main/
MIT License
690 stars 66 forks source link

Basic spaces support #78

Closed tmandry closed 2 years ago

tmandry commented 3 years ago

This adds basic support for spaces, using a unique integer ID to identify each space.

There are two space change events for before and after updating the set of known windows, so applications can prioritize responsiveness if they don't need full information.

An invisible window is created on each space to track it. Note that this makes it possible to track when spaces have been merged, but this is not yet supported.

tangert commented 3 years ago

very excited for this PR! are you planning on adding support for moving windows between spaces as well?

tmandry commented 3 years ago

are you planning on adding support for moving windows between spaces as well?

That would likely require using private APIs. So far I've avoided doing so with Swindler, but I would accept extensions that can be enabled/disabled with compile flags. This PR has an example of doing this.

tangert commented 3 years ago

are you planning on adding support for moving windows between spaces as well?

That would likely require using private APIs. So far I've avoided doing so with Swindler, but I would accept extensions that can be enabled/disabled with compile flags. This PR has an example of doing this.

awesome! ill look into it :)