summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2019-12-24 20:08:00 +0100
committerder richter <der.richter@gmx.de>2019-12-24 21:51:24 +0100
commit1caa653f2d8a76f97a009cf329b9f37f2af69abb (patch)
treed48b54bf0437849b52fdd09f262f214c51f28af0
parentd9e13f42b8d2490bf89b0af4dd1d6a92d280a9af (diff)
downloadmpv-1caa653f2d8a76f97a009cf329b9f37f2af69abb.tar.bz2
mpv-1caa653f2d8a76f97a009cf329b9f37f2af69abb.tar.xz
cocoa-cb: force redraw when screen or size changes
in certain circumstances the video was not redrawn even when the size or the backing scale factor changed. this could lead to a lower resolution output than intended. now it redraws the video when screen properties or the window size changes.
-rw-r--r--video/out/cocoa-cb/window.swift2
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/cocoa-cb/window.swift b/video/out/cocoa-cb/window.swift
index 55c0fa1688..25f144a38e 100644
--- a/video/out/cocoa-cb/window.swift
+++ b/video/out/cocoa-cb/window.swift
@@ -301,6 +301,7 @@ class Window: NSWindow, NSWindowDelegate {
let cRect = frameRect(forContentRect: rect)
unfsContentFrame = rect
setFrame(cRect, display: true)
+ cocoaCB.layer?.update(force: true)
}
}
@@ -464,6 +465,7 @@ class Window: NSWindow, NSWindowDelegate {
}
if currentScreen != screen {
cocoaCB.updateDisplaylink()
+ cocoaCB.layer?.update(force: true)
}
currentScreen = screen
}