summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkemi <der.richter@gmx.de>2018-06-15 12:49:09 +0200
committerJan Ekström <jeebjp@gmail.com>2018-10-02 20:36:55 +0300
commit7c2368ad7d4aa6291441322f6884f3990be71b82 (patch)
tree35ae1449c4d3faf1e0b890119395781fc0fa589a
parent008ddf42a1adc0a5835d11a8598b86f29d6dad78 (diff)
downloadmpv-7c2368ad7d4aa6291441322f6884f3990be71b82.tar.bz2
mpv-7c2368ad7d4aa6291441322f6884f3990be71b82.tar.xz
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. (cherry picked from commit 2b0b9bb6a1000a6f3aecabb628bb7e7246c4795b)
-rw-r--r--video/out/cocoa-cb/window.swift2
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)