I wrote a project that is working as a background app and I have this little issue.
Let's say I have 3 open desktops (spaces) on my mac:
- Space with open NSWindow from my project
- Empty space with no open folder apps
- Space with for example open folder
I am currently on space number 1.
I swipe 3 fingers left to switch to en empty space, and then again, to switch to a space with open folder (which immediately gets focus).
Then I swipe 3 fingers right to switch from 3rd space to 2nd, and what happens is that it (IMO) knows, that there is not a single NSWindow there to be focused on, so it switches to 1st space (without me even touching the touchpad) and NSWindow from my app is focused now.
My question is - how to prevent this? I mean, I don't remember setting such thing on purpose (my app is based on getting current focused NSWindow, but only when user clicks on a window).