mirror of
https://github.com/yattee/yattee.git
synced 2026-07-19 22:02:10 +00:00
The fullscreen button did nothing in sheet mode: AppKit ignores toggleFullScreen on a window attached as a sheet, and the old fallback targeted the key window — the sheet itself. Two other strategies were ruled out first: fullscreening the sheet's parent is silently refused while any sheet is attached, and resizing the sheet's backing window to screen size NaN-asserts inside AppKit's sheet positioning even without animation. Working approach: swap the sheet for a plain overlay in the main window and native-fullscreen the now sheet-free main window. - isMacPlayerFullScreenOverlay on NavigationCoordinator dismisses the sheet (presentation binding excludes it; the setter ignores the dismissal write-back) and mounts ExpandedPlayerSheet as a black-backed overlay in ContentView - ExpandedPlayerWindowManager fullscreens the parent after the sheet detaches, verifies AppKit accepted it (rolls back if refused), hides the window toolbar (NSWindow keeps it as a strip above the overlay otherwise) and restores it on exit - a didExitFullScreen observer restores the sheet on any exit path (button, Esc, green button, Window menu); closing the player while fullscreen exits the main window's fullscreen too - scheduleSharedViewAdoptionRetry on entry re-homes the shared render view once the dismissing sheet's window loses visibility — its steal is declined mid-dismissal and nothing else retried, leaving the overlay black until the next video load