From 6fd6bea8c4be3e5025645907a52f56521192fef3 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 25 Feb 2022 14:20:14 +0800 Subject: [PATCH] Fix calculation of scroll deltas when coalescing wheel events * src/xterm.c (handle_one_xevent): Use accumulated values instead of raw delta to determine scroll amounts. --- src/xterm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 18d68e52f12..32f76d156a6 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -11471,9 +11471,9 @@ handle_one_xevent (struct x_display_info *dpyinfo, scroll_unit *= XFLOATINT (Vx_scroll_event_delta_factor); if (val->horizontal) - total_x += delta * scroll_unit; + total_x += val->emacs_value * scroll_unit; else - total_y += delta * scroll_unit; + total_y += val->emacs_value * scroll_unit; found_valuator = true; val->emacs_value = 0; -- 2.39.5