1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 18:12:22 +00:00

cocoa-cb: fix unfs window size when toggling out of fullscreen

we properly set the unfs window size on live resize end. due to a race
condition in the fullscreen events, which is also a live resize, the
unfs window size is incorrectly set to a fullscreen size. this happens
when the end fs screen event triggers before the end of live resize one.

this just adds a second condition to not be un fullscreen when updating
the unfs window size.
This commit is contained in:
der richter 2020-07-12 12:06:56 +02:00
parent 4a93b046e9
commit c82abb3a65

View File

@ -498,7 +498,9 @@ class Window: NSWindow, NSWindowDelegate {
cocoaCB.layer?.inLiveResize = false
cocoaCB.mpv?.setConfigProperty(maximized: isZoomed)
if let contentViewFrame = contentView?.frame, !isAnimating {
if let contentViewFrame = contentView?.frame,
!isAnimating && !isInFullscreen
{
unfsContentFrame = convertToScreen(contentViewFrame)
}
}