]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix coarse scroll deltas on macOS
authorPo Lu <luangruo@yahoo.com>
Wed, 8 Dec 2021 11:44:50 +0000 (19:44 +0800)
committerPo Lu <luangruo@yahoo.com>
Wed, 8 Dec 2021 11:50:27 +0000 (19:50 +0800)
* src/nsterm.m (- mouseDown): Multiply deltas as appropriate.

src/nsterm.m

index 5c19b0cab8212ff474f9a493582564b1fafecee5..5d39be3a870b38ee8715b52d531ff003b0b228dc 100644 (file)
@@ -6658,8 +6658,10 @@ not_in_argv (NSString *arg)
                 ? ceil (fabs (delta)) : 1;
 
               scrollUp = delta > 0;
-             x = [theEvent scrollingDeltaX];
-             y = [theEvent scrollingDeltaY];
+             x = ([theEvent scrollingDeltaX]
+                  * FRAME_COLUMN_WIDTH (emacsframe));
+             y = ([theEvent scrollingDeltaY]
+                  * FRAME_LINE_HEIGHT (emacsframe));
             }
 
           if (lines == 0 && mwheel_coalesce_scroll_events)