Hacker News new | ask | show | jobs
by mafredri 2997 days ago
I'm not entirely sure what you mean with performance, macOS is pretty sluggish at reacting to new monitors anyway.

That said, Phoenix has an event for when the screens change, you can use it to react, enumerate the new screens, etc. Something like:

Event.on('screensDidChange', () => { const sizes = Screen.all().map(s => s.flippedVisibleFrame()); })

Hope that helps!