From 975ce6dbf52643c31513f869a1df44e8b29cdb3c Mon Sep 17 00:00:00 2001 From: gudvinr Date: Fri, 11 Jul 2025 19:50:05 +0300 Subject: [PATCH] plugin/wheel: reduce ACC_V120_THRESHOLD For mice with multipliers 30/120 and 40/120 nothing would change as both will still cross threshold only after 2nd event. But for MX Master 3 (and maybe others) that makes scroll beginning a bit responsive, without jumping straight to 64/120 or 72/120. Now events being emitted at 16+16+16 or 24+24 without significant side-effects ("twitching" when resting finger on the wheel, sudden scroll events when pressing middle button, etc). See !1262 for some background. Part-of: --- src/libinput-plugin-mouse-wheel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libinput-plugin-mouse-wheel.c b/src/libinput-plugin-mouse-wheel.c index 994967d0..7620f0bd 100644 --- a/src/libinput-plugin-mouse-wheel.c +++ b/src/libinput-plugin-mouse-wheel.c @@ -37,7 +37,7 @@ #include "libinput-util.h" #define ACC_V120_TRIGGER_THRESHOLD 30 /* 1/4 of a wheel detent */ -#define ACC_V120_THRESHOLD 59 +#define ACC_V120_THRESHOLD 47 /* Good for both high-ish multipliers (8/120) and the rest of the mice (30/120, 40/120, etc) */ #define WHEEL_SCROLL_TIMEOUT ms2us(500) enum wheel_state {