mirror of
https://github.com/yattee/yattee.git
synced 2026-07-19 22:02:10 +00:00
Sheet mode has no container lifecycle hook on either transition, so the shared render view was stuck until the render watchdog (~10s of black): - Presenting the sheet: the capsule parks the view while the sheet's window exists but is not yet visible - viewDidMoveToWindow has already fired and findTransferTarget rejects non-visible windows, so nothing picked the parked view up. - Dismissing the sheet: the dismissed sheet's hierarchy stays alive holding the view inside a now-invisible window, with no unmount or park at all. Add scheduleSharedViewAdoptionRetry() to MPVContainerNSView: for ~1s it re-checks every 50ms whether the shared view needs re-homing (parked, or owned by a container whose window lost visibility) and runs the same recovery the watchdog uses. Deduplicated so overlapping triggers don't stack loops. Triggered after parking with no transfer target and from hide()'s no-window branch, which every sheet-mode collapse funnels through. The retry ticks pass quiet: true to recoverSharedPlayerViewIfNeeded so teardown after closing a video (when no container legitimately exists) no longer spams warnings, and the loop stops once the shared view is gone.