diff options
author | der richter <der.richter@gmx.de> | 2020-07-12 12:06:56 +0200 |
---|---|---|
committer | der richter <der.richter@gmx.de> | 2020-07-12 12:06:56 +0200 |
commit | c82abb3a65ded48c39d46d4e2f966c5883ebe6c2 (patch) | |
tree | 1d78b42d195e98146fa29f9acf1e5e1c9f6c6a3e | |
parent | 4a93b046e954892edf3356bcd5745c612232fe15 (diff) | |
download | mpv-c82abb3a65ded48c39d46d4e2f966c5883ebe6c2.tar.bz2 mpv-c82abb3a65ded48c39d46d4e2f966c5883ebe6c2.tar.xz |
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.
-rw-r--r-- | video/out/cocoa-cb/window.swift | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/cocoa-cb/window.swift b/video/out/cocoa-cb/window.swift index b1a5b6c26b..ae1c7cf276 100644 --- a/video/out/cocoa-cb/window.swift +++ b/video/out/cocoa-cb/window.swift @@ -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) } } |