From fcf88b2e0ad81dc4fc6da7571feddd47cefd6e45 Mon Sep 17 00:00:00 2001 From: Lucas Date: Wed, 17 Apr 2024 18:56:07 -0300 Subject: [PATCH] Tell to mpv don't get mouse events In x11, mpv takes the mouse events for itself, so the SE UI doesn't respond to mouse interactions in the PanelPlayer. With this change, the UI responds to events correctly --- src/ui/Logic/VideoPlayers/LibMpvDynamic.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ui/Logic/VideoPlayers/LibMpvDynamic.cs b/src/ui/Logic/VideoPlayers/LibMpvDynamic.cs index 75571c9da..90038427a 100644 --- a/src/ui/Logic/VideoPlayers/LibMpvDynamic.cs +++ b/src/ui/Logic/VideoPlayers/LibMpvDynamic.cs @@ -691,6 +691,13 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers var logFileName = Path.Combine(Configuration.DataDirectory, "mpv-log-" + Guid.NewGuid() + ".txt"); _mpvSetOptionString(_mpvHandle, GetUtf8Bytes("log-file"), GetUtf8Bytes(logFileName)); } + + + if (_mpvSetOptionString(_mpvHandle, GetUtf8Bytes("input-cursor-passthrough"), GetUtf8Bytes("yes")) != 0) + { + // if --input-cursor-passthrough=yes is not avaliable, use --input-cursor=no + _mpvSetOptionString(_mpvHandle, GetUtf8Bytes("input-cursor"), GetUtf8Bytes("no")); + } } else if (!Directory.Exists(videoFileName)) {