summaryrefslogtreecommitdiffstats
path: root/video/out/cocoa_cb_common.swift
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/cocoa_cb_common.swift')
-rw-r--r--video/out/cocoa_cb_common.swift4
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/cocoa_cb_common.swift b/video/out/cocoa_cb_common.swift
index 0ce06428bd..cd43195a3e 100644
--- a/video/out/cocoa_cb_common.swift
+++ b/video/out/cocoa_cb_common.swift
@@ -114,7 +114,9 @@ class CocoaCB: NSObject {
layer.setVideo(true)
if self.mpv.getBoolProperty("fullscreen") {
- window.toggleFullScreen(nil)
+ DispatchQueue.main.async {
+ self.window.toggleFullScreen(nil)
+ }
} else {
window.isMovableByWindowBackground = true
}