When I query application windows by pid. By iterating the window tree. I get a few windows associated for that process. For example if I have an app running with only has one windows showing I still get bunch of windows associated with the process ID when I query the windows manager for windows under that PID.
I followed this example
How do I determine which window is the Main application window. Say I am running firefox, I am looking for the app windows, which all the tabs are underneath.
Thanks.