diff --git a/video/out/cocoa_cb_common.swift b/video/out/cocoa_cb_common.swift index 175053d7f0..bd4ac44727 100644 --- a/video/out/cocoa_cb_common.swift +++ b/video/out/cocoa_cb_common.swift @@ -94,10 +94,7 @@ class CocoaCB: Common { } let wr = getWindowGeometry(forScreen: targetScreen, videoOut: vo) - if !(window?.isVisible ?? false) && - !(window?.isMiniaturized ?? false) && - !NSApp.isHidden - { + if !(window?.isVisible ?? false) && !(window?.isMiniaturized ?? false) && !NSApp.isHidden { window?.makeKeyAndOrderFront(nil) } layer?.atomicDrawingStart() diff --git a/video/out/mac/common.swift b/video/out/mac/common.swift index 16489aa344..45628782e9 100644 --- a/video/out/mac/common.swift +++ b/video/out/mac/common.swift @@ -64,14 +64,10 @@ class Common: NSObject { func initApp() { var policy: NSApplication.ActivationPolicy = .regular switch option.mac.macos_app_activation_policy { - case 0: - policy = .regular - case 1: - policy = .accessory - case 2: - policy = .prohibited - default: - break + case 0: policy = .regular + case 1: policy = .accessory + case 2: policy = .prohibited + default: break } NSApp.setActivationPolicy(policy) diff --git a/video/out/mac/view.swift b/video/out/mac/view.swift index 58657170a2..0c6dbcd847 100644 --- a/video/out/mac/view.swift +++ b/video/out/mac/view.swift @@ -165,9 +165,7 @@ class View: NSView, CALayerDelegate { } override func magnify(with event: NSEvent) { - event.phase == .ended ? - common.windowDidEndLiveResize() : common.windowWillStartLiveResize() - + event.phase == .ended ? common.windowDidEndLiveResize() : common.windowWillStartLiveResize() common.window?.addWindowScale(Double(event.magnification)) }