]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix scroll wheel reporting on NS
authorPo Lu <luangruo@yahoo.com>
Thu, 25 Nov 2021 11:02:32 +0000 (19:02 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 25 Nov 2021 11:04:02 +0000 (19:04 +0800)
* src/nsterm.m (- mouseDown): Clear scroll wheel
accumulators.

src/nsterm.m

index 17f5b98c571d4a92da587fee333c84e584c0d3e4..80117a41a56941469950223ff59a967799d2cb9a 100644 (file)
@@ -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;
                 }