From 2b0b9bb6a1000a6f3aecabb628bb7e7246c4795b Mon Sep 17 00:00:00 2001 From: Akemi Date: Fri, 15 Jun 2018 12:49:09 +0200 Subject: cocoa-cb: fix side by side Split View when entering a Split View a windowDidEnterFullScreen event happens without a previous toggleFullScreen call. in that case it tries to stop an animation that was never initiated by us and basically breaks the system initiated fullscreen, or in this case the Split View. immediately after entering the fullscreen it tries top stop the animation and resizes the window, which causes the window to exit fullscreen. only try to stop an animation that was initiated by us and is safe to stop. --- video/out/cocoa-cb/window.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/out/cocoa-cb/window.swift b/video/out/cocoa-cb/window.swift index 907476fc09..b3e691b3a2 100644 --- a/video/out/cocoa-cb/window.swift +++ b/video/out/cocoa-cb/window.swift @@ -309,7 +309,7 @@ class Window: NSWindow, NSWindowDelegate { } func endAnimation(_ newFrame: NSRect = NSZeroRect) { - if !NSEqualRects(newFrame, NSZeroRect) { + if !NSEqualRects(newFrame, NSZeroRect) && isAnimating { NSAnimationContext.runAnimationGroup({ (context) -> Void in context.duration = 0.01 self.animator().setFrame(newFrame, display: true) -- cgit v1.2.3