diff options
author | Po Lu <luangruo@yahoo.com> | 2021-12-08 19:44:50 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2021-12-08 19:50:27 +0800 |
commit | 58cf601aada8cc80663c4e5e9a69ac7ce7f70b51 (patch) | |
tree | 920afa27b39e2f6f23d562fe4f18a8ba5f17be1f | |
parent | f10d4b31d6d9cc370597a32da4a88ac2d63e7bab (diff) | |
download | emacs-58cf601aada8cc80663c4e5e9a69ac7ce7f70b51.tar.gz emacs-58cf601aada8cc80663c4e5e9a69ac7ce7f70b51.tar.bz2 emacs-58cf601aada8cc80663c4e5e9a69ac7ce7f70b51.zip |
Fix coarse scroll deltas on macOS
* src/nsterm.m (- mouseDown): Multiply deltas as appropriate.
-rw-r--r-- | src/nsterm.m | 6 |
1 files 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) |