How can I position a NSWindow
in the correct Space?
I’m building a companion app that tracks another application. I’m able to position the companion correctly most of the time using setFrame
. However when I start using Spaces and moving the tracked application to a new Space, the companion app often ends up at the correct position in another Space.
It seems that the frame coordinates passed to setFrame
work well enough with several screens, but not with Spaces.
Can I position my NSWindow
in a specific Space, or is this answer from 2016 still accurate?