mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Fullscreen handling changes
This commit is contained in:
@@ -92,6 +92,16 @@ struct YatteeApp: App {
|
||||
.background(
|
||||
HostingWindowFinder { window in
|
||||
Windows.playerWindow = window
|
||||
|
||||
NotificationCenter.default.addObserver(
|
||||
forName: NSWindow.willExitFullScreenNotification,
|
||||
object: window,
|
||||
queue: OperationQueue.main
|
||||
) { _ in
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
|
||||
self.player.controls.playingFullscreen = false
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
.onAppear { player.presentingPlayer = true }
|
||||
|
Reference in New Issue
Block a user