Fix fullscreen not working when player window is pinned on macOS

A pinned window carries .fullScreenAuxiliary, which AppKit refuses to
make a primary fullscreen window, so toggleFullScreen was a silent
no-op. Drop the floating config before entering fullscreen and restore
it in windowDidExitFullScreen, keeping the pin setting intact.
This commit is contained in:
Arkadiusz Fal
2026-06-08 22:33:01 +02:00
parent a0a6634d1c
commit 0fa4df161b
2 changed files with 32 additions and 2 deletions

View File

@@ -1571,8 +1571,9 @@ extension ExpandedPlayerSheet {
playerService.seekBackward(by: seconds)
},
onToggleFullscreen: {
// Toggle native macOS fullscreen
NSApp.keyWindow?.toggleFullScreen(nil)
// Toggle native macOS fullscreen (drops the floating
// config first so a pinned window can enter fullscreen)
ExpandedPlayerWindowManager.shared.toggleFullScreen()
},
isFullscreen: NSApp.keyWindow?.styleMask.contains(.fullScreen) == true,
onClose: { [self] in