diff --git a/video/out/mac/common.swift b/video/out/mac/common.swift index 03d5c5bc25..8e7aab75ec 100644 --- a/video/out/mac/common.swift +++ b/video/out/mac/common.swift @@ -142,6 +142,7 @@ class Common: NSObject { view.layer = layer view.wantsLayer = true view.layerContentsPlacement = .scaleProportionallyToFit + layer.delegate = view } func initWindowState() { diff --git a/video/out/mac/view.swift b/video/out/mac/view.swift index a05127f0c3..89a2bc88ea 100644 --- a/video/out/mac/view.swift +++ b/video/out/mac/view.swift @@ -17,7 +17,7 @@ import Cocoa -class View: NSView { +class View: NSView, CALayerDelegate { unowned var common: Common var mpv: MPVHelper? { get { return common.mpv } }