From: Po Lu Date: Thu, 25 Nov 2021 11:02:32 +0000 (+0800) Subject: Fix scroll wheel reporting on NS X-Git-Tag: emacs-29.0.90~2852^2~44 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d0ea2a87f4d7a1afbe959fe53099222e120e8858;p=emacs.git Fix scroll wheel reporting on NS * src/nsterm.m (- mouseDown): Clear scroll wheel accumulators. --- diff --git a/src/nsterm.m b/src/nsterm.m index 17f5b98c571..80117a41a56 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -6604,7 +6604,10 @@ not_in_argv (NSString *arg) lines = abs (totalDeltaX / lineHeight); x = totalDeltaX; - totalDeltaX = totalDeltaX % lineHeight; + if (!x_coalesce_scroll_events) + totalDeltaX = 0; + else + totalDeltaX = totalDeltaX % lineHeight; totalDeltaY = 0; } else if (abs (totalDeltaY) >= abs (totalDeltaX) @@ -6616,7 +6619,10 @@ not_in_argv (NSString *arg) lines = abs (totalDeltaY / lineHeight); y = totalDeltaY; - totalDeltaY = totalDeltaY % lineHeight; + if (!x_coalesce_scroll_events) + totalDeltaY = 0; + else + totalDeltaY = totalDeltaY % lineHeight; totalDeltaX = 0; }