From 3263f47d3355502e3c7d3744c9d5160cd2776c0c Mon Sep 17 00:00:00 2001 From: Akemi Date: Thu, 1 Mar 2018 20:21:14 +0100 Subject: [PATCH] cocoa-cb: fix building with SDK 10.12 and earlier the NSWindowButton enum was moved to be a member of NSWindow and renamed to ButtonType in SDK 10.13. apparently that wasn't documented anywhere. not even in the SDK changes Document and the official Documentations makes it look like it was always like this. the old NSWindowButton enum though is still around on SDK 10.13 or at least got a typealias. so we will just use that. --- video/out/cocoa-cb/window.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/out/cocoa-cb/window.swift b/video/out/cocoa-cb/window.swift index c2a6feea9d..446dd522da 100644 --- a/video/out/cocoa-cb/window.swift +++ b/video/out/cocoa-cb/window.swift @@ -61,7 +61,7 @@ class Window: NSWindow, NSWindowDelegate { get { return NSWindow.frameRect(forContentRect: CGRect.zero, styleMask: .titled).size.height } } var titleButtons: [NSButton] { - get { return ([.closeButton, .miniaturizeButton, .zoomButton] as [NSWindow.ButtonType]).flatMap { standardWindowButton($0) } } + get { return ([.closeButton, .miniaturizeButton, .zoomButton] as [NSWindowButton]).flatMap { standardWindowButton($0) } } } override var canBecomeKey: Bool { return true }