check window is visible