diff options
author | der richter <der.richter@gmx.de> | 2019-09-29 18:35:12 +0200 |
---|---|---|
committer | der richter <der.richter@gmx.de> | 2019-10-06 13:29:48 +0200 |
commit | 6d0f0546ee851f4106438c5b92c8d1d152937ea7 (patch) | |
tree | f4efc2a603081fe75c19bea86c261d5320716c5b /video/out/cocoa-cb/title_bar.swift | |
parent | 2b19a7c964b821945e3ea06cfa81c1c064f2504d (diff) | |
download | mpv-6d0f0546ee851f4106438c5b92c8d1d152937ea7.tar.bz2 mpv-6d0f0546ee851f4106438c5b92c8d1d152937ea7.tar.xz |
cocoa-cb: remove get_property_* usages and split up mpv helper
all the get_property_* usages were removed because in some circumstances
they can lead to deadlocks. they were replaced by accessing the vo and
mp_vo_opts structs directly, like on other vos.
additionally the mpv helper was split into a mpv and libmpv helper, to
differentiate between private and public APIs and for future changes
like a macOS vulkan context for vo=gpu.
Diffstat (limited to 'video/out/cocoa-cb/title_bar.swift')
-rw-r--r-- | video/out/cocoa-cb/title_bar.swift | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/video/out/cocoa-cb/title_bar.swift b/video/out/cocoa-cb/title_bar.swift index 41d04a19ad..20812e9029 100644 --- a/video/out/cocoa-cb/title_bar.swift +++ b/video/out/cocoa-cb/title_bar.swift @@ -19,8 +19,8 @@ import Cocoa class TitleBar: NSVisualEffectView { - weak var cocoaCB: CocoaCB! - var mpv: MPVHelper { get { return cocoaCB.mpv } } + unowned var cocoaCB: CocoaCB + var libmpv: LibmpvHelper { get { return cocoaCB.libmpv } } var systemBar: NSView? { get { return cocoaCB.window?.standardWindowButton(.closeButton)?.superview } @@ -67,9 +67,9 @@ class TitleBar: NSVisualEffectView { window.contentView?.addSubview(self, positioned: .above, relativeTo: nil) window.titlebarAppearsTransparent = true window.styleMask.insert(.fullSizeContentView) - set(appearance: Int(mpv.macOpts?.macos_title_bar_appearance ?? 0)) - set(material: Int(mpv.macOpts?.macos_title_bar_material ?? 0)) - set(color: mpv.macOpts?.macos_title_bar_color ?? "#00000000") + set(appearance: Int(libmpv.macOpts.macos_title_bar_appearance)) + set(material: Int(libmpv.macOpts.macos_title_bar_material)) + set(color: libmpv.macOpts.macos_title_bar_color) } required init?(coder: NSCoder) { |