]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix calculation of scroll deltas when coalescing wheel events
authorPo Lu <luangruo@yahoo.com>
Fri, 25 Feb 2022 06:20:14 +0000 (14:20 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 25 Feb 2022 06:20:14 +0000 (14:20 +0800)
* src/xterm.c (handle_one_xevent): Use accumulated values
instead of raw delta to determine scroll amounts.

src/xterm.c

index 18d68e52f125238f1588e53206c09226fbfa4da5..32f76d156a69fc639a09f7708f68400647b871ec 100644 (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;