diff options
| author | Alan Third | 2017-09-08 19:26:47 +0100 |
|---|---|---|
| committer | Alan Third | 2017-09-19 20:08:51 +0100 |
| commit | a5fec62b519ae8c0a6528366ac8b71cd0c7ac52e (patch) | |
| tree | f9b300285aacb4df9995ea5e4559663f2afee735 /src/termhooks.h | |
| parent | 7b3d1c6beb54ef6c423a93df88aebfd6fecbe2c2 (diff) | |
| download | emacs-a5fec62b519ae8c0a6528366ac8b71cd0c7ac52e.tar.gz emacs-a5fec62b519ae8c0a6528366ac8b71cd0c7ac52e.zip | |
Provide native touchpad scrolling on macOS
* etc/NEWS: Describe changes.
* lisp/term/ns-win.el (mouse-wheel-scroll-amount,
mouse-wheel-progressive-speed): Set to smarter values for macOS
touchpads.
* src/nsterm.m (emacsView::mouseDown): Use precise scrolling deltas to
calculate scrolling for touchpads and mouse wheels.
(syms_of_nsterm): Add variables 'ns-use-system-mwheel-acceleration',
'ns-touchpad-scroll-line-height' and 'ns-touchpad-use-momentum'.
* src/keyboard.c (make_lispy_event): Pass on .arg when relevant.
* src/termhooks.h (event_kind): Update comments re. WHEEL_EVENT.
* lisp/mwheel.el (mwheel-scroll): Use line count.
* lisp/subr.el (event-line-count): New function.
Diffstat (limited to 'src/termhooks.h')
| -rw-r--r-- | src/termhooks.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/termhooks.h b/src/termhooks.h index 97c128ba4e2..b5171bf1229 100644 --- a/src/termhooks.h +++ b/src/termhooks.h | |||
| @@ -116,7 +116,9 @@ enum event_kind | |||
| 116 | .frame_or_window gives the frame | 116 | .frame_or_window gives the frame |
| 117 | the wheel event occurred in. | 117 | the wheel event occurred in. |
| 118 | .timestamp gives a timestamp (in | 118 | .timestamp gives a timestamp (in |
| 119 | milliseconds) for the event. */ | 119 | milliseconds) for the event. |
| 120 | .arg may contain the number of | ||
| 121 | lines to scroll. */ | ||
| 120 | HORIZ_WHEEL_EVENT, /* A wheel event generated by a second | 122 | HORIZ_WHEEL_EVENT, /* A wheel event generated by a second |
| 121 | horizontal wheel that is present on some | 123 | horizontal wheel that is present on some |
| 122 | mice. See WHEEL_EVENT. */ | 124 | mice. See WHEEL_EVENT. */ |