Part of my app is opening applications and preserving the work space that they have opened in. My problem is checking if the main application window has opened so I can go and switch to the next work space. Normally, I could just check if A window if that app was open, but for some apps such as IntelliJ IDEA, there is a loading window that is not main, but still shows up in CGWindowListCopyWindowInfo()
. I check if a window of the app is open, then check if it has a title. This works for the IntelliJ IDEA apps, but applications like calculator that have main window of the apps without a window title, the code goes into an infinite wait loop. I have googled around and have not come up with anything, and this is one of the last things that needs to be fixed in my app.
Will add code later (when I have my computer)
TL;DR:
I need to check if the main window of an app is open. (Apps like INtelliJ IDEA have a loading window, and the window needs to be preserved in a work space.