Only render if window is visible