From c82abb3a65ded48c39d46d4e2f966c5883ebe6c2 Mon Sep 17 00:00:00 2001 From: der richter Date: Sun, 12 Jul 2020 12:06:56 +0200 Subject: 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. --- video/out/cocoa-cb/window.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) } } -- cgit v1.2.3