mirror of https://github.com/mpv-player/mpv
mac: add support for --input-cursor-passthrough option
This commit is contained in:
parent
dde2776655
commit
4d7763e6a6
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue