From: Po Lu Date: Fri, 25 Feb 2022 06:20:14 +0000 (+0800) Subject: Fix calculation of scroll deltas when coalescing wheel events X-Git-Tag: emacs-29.0.90~2111 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6fd6bea8c4be3e5025645907a52f56521192fef3;p=emacs.git 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. --- 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;