mirror of
https://github.com/mpv-player/mpv
synced 2025-02-19 14:26:57 +00:00
input: prevent MBTN_LEFT conflict with VO dragging
Currently, the built-in VO dragging conflicts with the MBTN_LEFT binding, so the binding is activated even though the VO dragging begins. Fix this by releasing the currently down command so that MBTN_LEFT can be bound to a useful action (such as play/pause).
This commit is contained in:
parent
a6683ea3c9
commit
349aac462e
@ -922,6 +922,8 @@ static void set_mouse_pos(struct input_ctx *ictx, int x, int y)
|
||||
if (ictx->dragging_button_down && mouse_outside_dragging_deadzone) {
|
||||
// Begin built-in VO dragging if the mouse moves while the dragging button is down.
|
||||
ictx->dragging_button_down = false;
|
||||
// Prevent activation of MBTN_LEFT key binding if VO dragging begins.
|
||||
release_down_cmd(ictx, true);
|
||||
mp_cmd_t *drag_cmd = mp_input_parse_cmd(ictx, bstr0("begin-vo-dragging"), "<internal>");
|
||||
queue_cmd(ictx, drag_cmd);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user