mirror of
https://github.com/mpv-player/mpv
synced 2024-10-30 04:46:41 +01:00
092f556898
Currently, VO dragging logic is hardcoded into each VO, where a left mouse button down event unconditionally begins dragging if the VO dragging test passes. This method is extremely unflexible as the VO has no knowledge of what is happening in the input system: while begin dragging with the second click of a doubleclick is undesired, it cannot determine whether a click is a double click or not because it's determined by the input system. The better way to do it is to handle it somewhere in the downstream consumers of the events instead, as they have more information to make this decision. The input system is the perfect place for this as the logic for checking doubleclick already exists. So just issue a begin-vo-dragging command if it detects a left mouse button down which isn't also a doubleclick in this case, and delete all hardcoded VO dragging logic in win32, x11, and wayland. Note that this solution hardcodes left mouse button down for now, but because the VO dragging is now centralized, it's possible to make more improvements, such as a deadzone mechanism to fix the conflict with MBTN_LEFT mouse bind. |
||
---|---|---|
.. | ||
cmd.c | ||
cmd.h | ||
event.c | ||
event.h | ||
input.c | ||
input.h | ||
ipc-dummy.c | ||
ipc-unix.c | ||
ipc-win.c | ||
ipc.c | ||
keycodes.c | ||
keycodes.h | ||
meson.build | ||
sdl_gamepad.c |