I’m building a macOS tiling window manager in Swift. It works perfectly on a single monitor and is currently the closest out of every single current macOS tiling WM to a full Linux Niri experience on macOS, including a Niri-like overview, animations and a true quake terminal implemented using libghostty (Ghostty itself).
For over a month I’ve been stuck on multi-monitor support. When navigating or rearranging windows, I sometimes see brief flashes or “leaks” where windows appear on the wrong monitor before settling into the correct layout. The final result is correct, but the intermediate states are visible.
I’ve tried serializing and batching updates, deferring frame changes, reordering Accessibility calls, and reducing layout passes, but I haven’t found a way to guarantee atomic-looking transitions across displays.
At this point I suspect I’m approaching this incorrectly. I’m fully open to rewriting parts of the system if needed.
The project is fully open source and free forever and guaranteed no paywall gating ever. If any experienced Swift/macOS engineers would be willing to take a look at the code or offer architectural guidance, I’d really appreciate it otherwise I fear I might go bald from the stress of trying to solve this.