diff options
| author | Jason Rumney | 2003-06-04 22:03:44 +0000 |
|---|---|---|
| committer | Jason Rumney | 2003-06-04 22:03:44 +0000 |
| commit | 1beaad814a4ac4fa48bc8659736de3bfaf8ae2cf (patch) | |
| tree | 7e5ca399320325567b6dffc22ebed01e13eb37d2 /src/macterm.c | |
| parent | e9ec1a292f4b4b50a21f6da1c79af11a7d06a4bf (diff) | |
| download | emacs-1beaad814a4ac4fa48bc8659736de3bfaf8ae2cf.tar.gz emacs-1beaad814a4ac4fa48bc8659736de3bfaf8ae2cf.zip | |
(XTread_socket): Map mouse wheel events to Emacs
WHEEL_EVENT events.
Diffstat (limited to 'src/macterm.c')
| -rw-r--r-- | src/macterm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/macterm.c b/src/macterm.c index 0bcf85f6ff2..f087c78870e 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -7682,9 +7682,11 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) | |||
| 7682 | GetEventParameter(eventRef, kEventParamMouseLocation, | 7682 | GetEventParameter(eventRef, kEventParamMouseLocation, |
| 7683 | typeQDPoint, NULL, sizeof (Point), | 7683 | typeQDPoint, NULL, sizeof (Point), |
| 7684 | NULL, &point); | 7684 | NULL, &point); |
| 7685 | bufp->kind = MOUSE_WHEEL_EVENT; | 7685 | bufp->kind = WHEEL_EVENT; |
| 7686 | bufp->code = delta; | 7686 | bufp->code = 0; |
| 7687 | bufp->modifiers = mac_event_to_emacs_modifiers(eventRef); | 7687 | bufp->modifiers = (mac_event_to_emacs_modifiers(eventRef) |
| 7688 | | ((delta < 0) ? down_modifier | ||
| 7689 | : up_modifier)); | ||
| 7688 | SetPort (GetWindowPort (window_ptr)); | 7690 | SetPort (GetWindowPort (window_ptr)); |
| 7689 | GlobalToLocal (&point); | 7691 | GlobalToLocal (&point); |
| 7690 | XSETINT (bufp->x, point.h); | 7692 | XSETINT (bufp->x, point.h); |