Skip to content

Commit

Permalink
input: prevent MBTN_LEFT conflict with VO dragging
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
na-na-hi authored and kasper93 committed Jun 4, 2024
1 parent a6683ea commit 349aac4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions input/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 349aac4

Please # to comment.