diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 0d6b4c18dc..0e0afb09e1 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -4149,7 +4149,7 @@ Input Support depends on the VO in use. ``--input-cursor-passthrough``, ``--no-input-cursor-passthrough`` - (X11 and Wayland only) + (X11, Wayland and macOS only) Tell the backend windowing system to allow pointer events to passthrough the mpv window. This allows windows under mpv to instead receive pointer events as if the mpv window was never there. diff --git a/video/out/mac/common.swift b/video/out/mac/common.swift index 83cac04e8e..cdf0578fab 100644 --- a/video/out/mac/common.swift +++ b/video/out/mac/common.swift @@ -553,6 +553,10 @@ class Common: NSObject { DispatchQueue.main.async { self.window?.setMaximized(Bool(mpv.opts.window_maximized)) } + case MPVHelper.getPointer(&mpv.optsPtr.pointee.cursor_passthrough): + DispatchQueue.main.async { + self.window?.ignoresMouseEvents = mpv.opts.cursor_passthrough + } case MPVHelper.getPointer(&mpv.optsPtr.pointee.geometry): fallthrough case MPVHelper.getPointer(&mpv.optsPtr.pointee.autofit): fallthrough case MPVHelper.getPointer(&mpv.optsPtr.pointee.autofit_smaller): fallthrough diff --git a/video/out/mac/window.swift b/video/out/mac/window.swift index 8002c43929..8a8c56c76a 100644 --- a/video/out/mac/window.swift +++ b/video/out/mac/window.swift @@ -91,6 +91,7 @@ class Window: NSWindow, NSWindowDelegate { title = com.title minSize = NSMakeSize(160, 90) collectionBehavior = .fullScreenPrimary + ignoresMouseEvents = mpv?.opts.cursor_passthrough ?? false delegate = self if let cView = contentView {