Typically when you use setAlwaysOnTop on mac in a Juce App, it floats it above all windows in the system… Got some complaints about that(user’s wanted the window to disappear when the app doesn’t have focus)…
We emulate this behaviour with the Tracktion plugin windows by using a timer and checking Process::isForegroundProcess. If the state changes you can hide/show the relevant windows.
I know this is an old thread, but I’m just encountering this. I suspect the only way to do this on Windows would be to listen for WM_ACTIVATEAPP in your winproc and then hide/show the windows as needed. Not sure if there’s a better way, but I’d love to hear about it if there is.
That’s exactly what I ended up doing for our app (12 years ago :)). Works great. Did it by creating a hidden window whose only purpose is to handle WM_ACTIVATEAPP in its WndProc. IIRC I stole this idea from juce_win32_Messaging.cpp.