The Origin Story:
The impetus for this came when I was scrolling on my Mac and hit a video that asked the viewer to turn their screen upside down to see an optical illusion. Since I was on a desktop display rather than a phone, I couldn't just flip my device. When I went looking for a quick utility to rotate a single window, I was surprised to find nothing out there actually did it—so I decided to build one.
The Technical Challenge & Workaround:
macOS doesn't provide a public API to rotate another application’s window. Doing it "for real" requires private SkyLight calls (CGSSetWindowTransform) and turning off System Integrity Protection (SIP)—definitely not worth it.
To make it work safely on standard macOS, SpinWin "fakes" the effect:
Moves the target window off-screen via the Accessibility API so it keeps rendering without taking up desk space.
Captures its frame feed live using ScreenCaptureKit (SCStream + desktopIndependentWindow filter).
Renders the live stream inside a transparent, borderless overlay window at the original location using a CALayer transform for smooth rotation.
Current Tech Stack:
Built natively with Swift / SwiftUI using ScreenCaptureKit and Accessibility APIs.
Limitations:
The overlay is a live, non-interactive visual proxy (clicks aren't passed through to the real window underneath), and Exposé/Mission Control will still briefly show the unrotated hidden window off-screen.
The app is open-source, signed, and notarized.
dbm5•1h ago
I was scrolling reels when one came on where the content creator suggested "turning the phone upside down" for a portion. I was sitting at my mac, and decided to see if I could find something that did this. To my surprise, nothing exists, so I decided to build it.
Turns out macOS doesn't provide any public API to do anything like this, so I wound up using the Accessibility API to move the target window offscreen, where it keeps rendering. Then we capture it's contents with ScreenCaptureKit, and display that on a transparent, borderless overlay window which has a CALayer to rotate it.
It's written in Swift, open source, MIT license, and signed/notarized.
Have fun - would love to hear your comments.