From 7758f6f50e103ffecea7f02cf8cc148790b86bb6 Mon Sep 17 00:00:00 2001 From: der richter Date: Thu, 29 Feb 2024 14:13:29 +0100 Subject: [PATCH] mac/vulkan: set NSView as layer delegate like recommended by MoltenVK --- video/out/mac/common.swift | 1 + video/out/mac/view.swift | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 } }