summaryrefslogtreecommitdiffstats
path: root/video/out/cocoa_cb_common.swift
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2020-09-14 17:27:43 +0200
committerder richter <der.richter@gmx.de>2020-09-25 16:48:24 +0200
commit18a35f17e2f36a9af0f647f04f08b6b5b56e10e4 (patch)
tree17485978ca8f1aded38e2b22487d1bcd9137ea8f /video/out/cocoa_cb_common.swift
parentc535dfed6657da738e2df7d83fdc39b8950a3463 (diff)
downloadmpv-18a35f17e2f36a9af0f647f04f08b6b5b56e10e4.tar.bz2
mpv-18a35f17e2f36a9af0f647f04f08b6b5b56e10e4.tar.xz
mac: add an option to prevent focusing of the window on open
on macOS 10.15 setting the activation policy behaves quite weirdly. the call changes the current active App to a nameless process, which probably also the reason that prevents the not focusing to work. a workaround for that, is to refocus the previous active app. Fixes #7725
Diffstat (limited to 'video/out/cocoa_cb_common.swift')
-rw-r--r--video/out/cocoa_cb_common.swift3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/cocoa_cb_common.swift b/video/out/cocoa_cb_common.swift
index 6cea9a60c3..476b4820bc 100644
--- a/video/out/cocoa_cb_common.swift
+++ b/video/out/cocoa_cb_common.swift
@@ -73,8 +73,9 @@ class CocoaCB: Common {
}
func initBackend(_ vo: UnsafeMutablePointer<vo>) {
+ let previousActiveApp = getActiveApp()
initApp()
- initWindow(vo)
+ initWindow(vo, previousActiveApp)
updateICCProfile()
initWindowState()