Fix window_set_visible old implementation wasn't even close