numist / Switch

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

Swift/SwiftUI rewrite #139

Open numist opened 3 years ago

numist commented 3 years ago

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 commented 3 years ago

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