1
mirror of https://github.com/mpv-player/mpv synced 2025-01-05 03:06:28 +01:00

input: do not generate double clicks for mouse wheel

Button 3 and 4 are mapped to the mouse wheel. Double click events for
them annoying and not useful at all.

I don't know about buttons 5-19; for all I know these could be mapped
to wheels as well. Even if not, double click events are probably not
very important for these. Disable double clicks for these as well.
This commit is contained in:
wm4 2012-12-02 01:57:48 +01:00
parent 01584151c8
commit 2f14134a30

View File

@ -44,7 +44,7 @@ struct mp_fifo *mp_fifo_create(struct input_ctx *input, struct MPOpts *opts)
static void put_double(struct mp_fifo *fifo, int code)
{
if (code >= MOUSE_BTN0 && code < MOUSE_BTN_END)
if (code >= MOUSE_BTN0 && code <= MOUSE_BTN2)
mp_input_feed_key(fifo->input, code - MOUSE_BTN0 + MOUSE_BTN0_DBL);
}