mirror of
https://github.com/yattee/yattee.git
synced 2026-07-20 14:22:02 +00:00
The player video surface is a single shared MPVOGLView that is re-parented between the mini-bar container (main window) and the expanded-player sheet (a separate sheet window). When presenting the sheet, the new container attaches the shared view before the old mini-bar container tears down, so the old container's viewWillMove(toSuperview: nil) was ripping the shared view out of its new home via removeFromSuperview() — leaving it with no window and a black surface. Symmetric, so it also blanked the mini-bar preview after collapsing. Only detach the shared view if it still belongs to the container (superview === self). Also force a repaint on window reattach so a paused frame redraws, and extend the onAppear resumeRendering to macOS.