mirror of
https://github.com/mpv-player/mpv
synced 2025-01-02 21:12:23 +00:00
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.
This commit is contained in:
parent
7ee01860d9
commit
3263f47d33
@ -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 }
|
||||
|
Loading…
Reference in New Issue
Block a user