-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
MBTN_LEFT dragging window conflicts with mpv-player/mpv#14251 #48
Comments
看起来还是官方的补丁有问题,不仅与inputevent冲突,还把所有OSC脚本的进度条拖动功能给破坏了 |
OSC进度条拖动已经修复了 mpv-player/mpv@0509e5b ,但还是与inputevent冲突 |
mp.add_forced_key_binding(
"MBTN_LEFT",
"MBTN_LEFT",
function(e)
print(e.event)
end,
{ complex = true }
) 拖动时立刻打印 down, up , mpv那边改成 down,drag 或者其他方式通知 drag 事件才能修。 今天 shinchiro 的自动编译没出来,过两天再看看 我现在 uosc 的进度条不能拖 |
zhongfly的构建比较快 2024-06-06 12:10,进度条拖动应该没问题了。 与脚本按键绑定冲突的原因 mpv-player/mpv#14251 (comment) , 我试了一下,这样改可以 function InputEvent:bind()
self.exec_debounced = debounce(function() self:exec() end, self.duration)
mp.add_forced_key_binding(self.key, self.key, function(e)
if e.canceled and self.key:upper() == "MBTN_LEFT" then
self.queue = {}
return
end
self:handler(e.event)
end, { complex = true })
end 本来想只用 |
盲改的,我有空试一试 |
我觉得
|
补丁已经合并了,最新的zhongfly和shinchiro构建都能直接用了。 想到个不错的方案,碰到取消信号时忽略 function(e)
if e.canceled then self:ignore('click', self.duration) end
self:handler(e.event)
end |
改了下,我试了下感觉没什么问题 |
fixed b9fb2bd |
本来inputevent修复了拖动窗口会触发左键的问题,
官方修复之后 mpv-player/mpv#14251,两个有冲突,用了inputevent反而会触发左键
hooke007/MPV_lazy#401 (reply in thread)
The text was updated successfully, but these errors were encountered: