From 0602f082cb9775b4c9c8e256b1cb9de218a3b5fc Mon Sep 17 00:00:00 2001 From: der richter Date: Fri, 10 May 2019 22:01:15 +0200 Subject: cocoa-cb: fix optional cases on macOS 10.12 --- video/out/cocoa-cb/window.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/video/out/cocoa-cb/window.swift b/video/out/cocoa-cb/window.swift index 35d9b1bd91..dc7762c5af 100644 --- a/video/out/cocoa-cb/window.swift +++ b/video/out/cocoa-cb/window.swift @@ -260,18 +260,18 @@ class Window: NSWindow, NSWindowDelegate { if state { if ontopLevel is Int { switch ontopLevel as? Int { - case -1: + case .some(-1): level = Int(CGWindowLevelForKey(.floatingWindow)) - case -2: + case .some(-2): level = Int(CGWindowLevelForKey(.statusWindow))+1 default: level = ontopLevel as? Int ?? stdLevel } } else { switch ontopLevel as? String { - case "window": + case .some("window"): level = Int(CGWindowLevelForKey(.floatingWindow)) - case "system": + case .some("system"): level = Int(CGWindowLevelForKey(.statusWindow))+1 default: level = Int(ontopLevel as? String ?? "") ?? stdLevel -- cgit v1.2.3