emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 6fd6bea8c4: Fix calculation of scroll deltas when coalescing whee


From: Po Lu
Subject: master 6fd6bea8c4: Fix calculation of scroll deltas when coalescing wheel events
Date: Fri, 25 Feb 2022 01:20:57 -0500 (EST)

branch: master
commit 6fd6bea8c4be3e5025645907a52f56521192fef3
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    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 18d68e52f1..32f76d156a 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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]