Closed saagarjha closed 3 months ago
I'm not sure if you're accepting PRs here at all, but I was able to achieve this in my fork here.
I'd be happy to open a PR if you're okay with this implementation.
I appreciate the effort you've put into this, but I am actively working on this :) There's a bit more that needs to go into it to fully implement this, so I won't be taking the contribution for now.
No problem at all, I'm happy to see your solution as I am definitely just a beginner with Swift in general!
Idle question: have you been able to get your implementation to actually work? NSRunningApplication.activate(options:)
just returns false
for me if another app is focused.
Yeah my implementation is working for me currently. I hadn't pushed my latest changes to that branch though - I have to activate the window whenever the mouse is moved in that window. It's been kinda hit or miss though.
Huh actually it looks like it only reliably works with the macOS Ensemble window, other windows seem to not be deactivated.
When interacting with a window on visionOS, it needs to be raised and made active on macOS so events go to it