diff options
author | der richter <der.richter@gmx.de> | 2020-02-22 12:22:16 +0100 |
---|---|---|
committer | der richter <der.richter@gmx.de> | 2020-02-22 13:56:31 +0100 |
commit | 327b092bfc1c0efacfe669d9a0c220ca921257fc (patch) | |
tree | f86324a74ea18d428c92f592c13356f2b8f5aaa3 /video/out | |
parent | 8e1ceaba343191996dfb280e8ce698675ea3ad43 (diff) | |
download | mpv-327b092bfc1c0efacfe669d9a0c220ca921257fc.tar.bz2 mpv-327b092bfc1c0efacfe669d9a0c220ca921257fc.tar.xz |
mac, cocoa: fix UI updates on none main queue threads
injecting the Apple Main Thread Checker via
DYLD_INSERT_LIBRARIES=libMainThreadChecker.dylib identified several
problems that needed fixing.
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/cocoa_common.m | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index 4779d35a1f..1940861dca 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -395,8 +395,10 @@ void vo_cocoa_init(struct vo *vo) cocoa_add_event_monitor(vo); if (!s->embedded) { - [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular]; - set_application_icon(NSApp); + run_on_main_thread(vo, ^{ + [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular]; + set_application_icon(NSApp); + }); } } |