diff options
authorAkemi <>2018-06-15 12:49:09 +0200
committerJan Ekström <>2018-10-02 20:13:19 +0300
commit2b0b9bb6a1000a6f3aecabb628bb7e7246c4795b (patch)
parent1842a932d37638c910f4471d85e81554076c3d2c (diff)
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.
1 files changed, 1 insertions, 1 deletions
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)