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.
This commit is contained in:
der richter 2019-12-24 20:08:00 +01:00
parent d9e13f42b8
commit 1caa653f2d
1 changed files with 2 additions and 0 deletions

View File

@ -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
}