From 1beaad814a4ac4fa48bc8659736de3bfaf8ae2cf Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Wed, 4 Jun 2003 22:03:44 +0000 Subject: [PATCH] (XTread_socket): Map mouse wheel events to Emacs WHEEL_EVENT events. --- src/macterm.c | 8 +++++--- 1 file 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) GetEventParameter(eventRef, kEventParamMouseLocation, typeQDPoint, NULL, sizeof (Point), NULL, &point); - bufp->kind = MOUSE_WHEEL_EVENT; - bufp->code = delta; - bufp->modifiers = mac_event_to_emacs_modifiers(eventRef); + bufp->kind = WHEEL_EVENT; + bufp->code = 0; + bufp->modifiers = (mac_event_to_emacs_modifiers(eventRef) + | ((delta < 0) ? down_modifier + : up_modifier)); SetPort (GetWindowPort (window_ptr)); GlobalToLocal (&point); XSETINT (bufp->x, point.h); -- 2.39.5