summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkemi <der.richter@gmx.de>2018-03-01 20:21:14 +0100
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2018-03-01 21:20:24 +0100
commit3263f47d3355502e3c7d3744c9d5160cd2776c0c (patch)
tree9b3e77a8ace2af5dc2dd7d59d83ddfb24f5fd9ee
parent7ee01860d9c16f2d9d9ea3f5ae5c2a699c7cf1f9 (diff)
downloadmpv-3263f47d3355502e3c7d3744c9d5160cd2776c0c.tar.bz2
mpv-3263f47d3355502e3c7d3744c9d5160cd2776c0c.tar.xz
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.
-rw-r--r--video/out/cocoa-cb/window.swift2
1 files changed, 1 insertions, 1 deletions
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 }