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.
This commit is contained in:
Po Lu 2022-02-25 14:20:14 +08:00
parent a2e80d2a41
commit 6fd6bea8c4

View file

@ -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;