Add `onHide` to be called when a previously visible window is set to invisible in `UIManager:setVisibleWindow`