Skip to content

Commit

Permalink
input: reset doubleclick timer when dragging begins
Browse files Browse the repository at this point in the history
This prevents doubleclick from activation if a second mouse click comes
quickly after a click which begins dragging.
  • Loading branch information
na-na-hi authored and kasper93 committed Jun 4, 2024
1 parent 49b5e6d commit 7e82108
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 @@ -929,6 +929,8 @@ static void set_mouse_pos(struct input_ctx *ictx, int x, int y)
ictx->dragging_button_down = false;
// Prevent activation of MBTN_LEFT key binding if VO dragging begins.
release_down_cmd(ictx, true);
// Prevent activation of MBTN_LEFT_DBL if VO dragging begins.
ictx->last_doubleclick_time = 0;
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 7e82108

Please sign in to comment.