don't draw if the window is not visible.