mirror of https://github.com/mpv-player/mpv
mac/vulkan: set NSView as layer delegate like recommended by MoltenVK
This commit is contained in:
parent
9b301a0537
commit
7758f6f50e
|
@ -142,6 +142,7 @@ class Common: NSObject {
|
||||||
view.layer = layer
|
view.layer = layer
|
||||||
view.wantsLayer = true
|
view.wantsLayer = true
|
||||||
view.layerContentsPlacement = .scaleProportionallyToFit
|
view.layerContentsPlacement = .scaleProportionallyToFit
|
||||||
|
layer.delegate = view
|
||||||
}
|
}
|
||||||
|
|
||||||
func initWindowState() {
|
func initWindowState() {
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
|
||||||
class View: NSView {
|
class View: NSView, CALayerDelegate {
|
||||||
unowned var common: Common
|
unowned var common: Common
|
||||||
var mpv: MPVHelper? { get { return common.mpv } }
|
var mpv: MPVHelper? { get { return common.mpv } }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue