mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.04k stars 2.88k forks source link

input: implement VO dragging deadzone #14251

Closed na-na-hi closed 4 months ago

na-na-hi commented 4 months ago

This PR fixes several problems with VO dragging:

Fixes #7563. Fixes #13225. Fixes #13958. Fixes #14248.

github-actions[bot] commented 4 months ago

Download the artifacts for this pull request:

Windows * [mpv-i686-w64-mingw32](https://nightly.link/mpv-player/mpv/actions/artifacts/1542604181.zip) * [mpv-x86_64-w64-mingw32](https://nightly.link/mpv-player/mpv/actions/artifacts/1542610939.zip) * [mpv-x86_64-windows-msvc](https://nightly.link/mpv-player/mpv/actions/artifacts/1542618681.zip)
macOS * [mpv-macos-12-intel](https://nightly.link/mpv-player/mpv/actions/artifacts/1542602706.zip) * [mpv-macos-13-intel](https://nightly.link/mpv-player/mpv/actions/artifacts/1542609462.zip) * [mpv-macos-14-arm](https://nightly.link/mpv-player/mpv/actions/artifacts/1542602212.zip)
verygoodlee commented 4 months ago

It breaks OSC seekbar mouse dragging, both osc.lua uosc and mpv-osc-modern are affected.

na-na-hi commented 4 months ago

It breaks OSC seekbar mouse dragging

Should be fixed by https://github.com/mpv-player/mpv/pull/14301.

verygoodlee commented 3 months ago

Why conflict with MBTN_LEFT script binding. In this case, #7563 can still reproducible, the difference is MBTN_LEFT is triggered at the begin of dragging, not at the end of dragging.

mp.add_forced_key_binding('MBTN_LEFT', 'MBTN_LEFT', function() mp.commandv('cycle', 'pause') end)
na-na-hi commented 3 months ago

In this case, https://github.com/mpv-player/mpv/issues/7563 can still reproducible, the difference is MBTN_LEFT is triggered at the begin of dragging, not at the end of dragging.

There is a bug with key bindings registered by scripts which are incorrectly triggered if the command is canceled. https://github.com/mpv-player/mpv/pull/14311 fixes this.

input.conf bindings aren't affected.