From 58cf601aada8cc80663c4e5e9a69ac7ce7f70b51 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Wed, 8 Dec 2021 19:44:50 +0800 Subject: [PATCH] Fix coarse scroll deltas on macOS * src/nsterm.m (- mouseDown): Multiply deltas as appropriate. --- src/nsterm.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index 5c19b0cab82..5d39be3a870 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -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) -- 2.39.5