Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift/SwiftUI rewrite #139

Draft
wants to merge 140 commits into
base: develop
Choose a base branch
from
Draft

Swift/SwiftUI rewrite #139

wants to merge 140 commits into from

Conversation

numist
Copy link
Owner

@numist numist commented Apr 13, 2021

So this branch has been coming along for a while, and the results are already quite pleasant:

Screen shot of Xcode with switcher interface previewed in SwiftUI

It's faster, it's less buggy. The swiftifacation of Switch's use of event taps in particular exposed some likely issues in the [Objective-]C implementation while also making it easier to manage adding a bonus runloop dedicated to servicing the event tap(s) at a higher priority than the main thread itself.

The downsides so far are the obvious: tests need to be ported to the new world order (and there's a lot of them since window groups aren't exposed as API so Switch has to maintain a laundry list of compatibility hacks for "quirks") and SwiftUI doesn't play great with AppKit stuff like mouse interactions. Oh yeah, and window switching via Accessibility got completely broken by Big Sur and now you get all of the app's windows instead of just the one you selected. Sigh.

But it's far enough along that it's ready for people familiar with git and Xcode to try out. Remaining work toward 0.0.10β parity includes:

numist added 30 commits August 12, 2020 01:16
Keeping all those ugly force casts together in one place
…owInfo] from the results of CGWindowListCopyWindowInfo()
…dowInfo

Relevant keys in the info dictionary populated by AX
@numist
Copy link
Owner Author

numist commented Apr 13, 2021

Oh GitHub supports linked issues now. Well, now I know that for next time I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant