in WindowInfo constructor, add check window is visible.
change data structure to List from ArrayList.