]> code.delx.au - gnu-emacs/commitdiff
(XTread_socket): Map mouse wheel events to Emacs
authorJason Rumney <jasonr@gnu.org>
Wed, 4 Jun 2003 22:03:44 +0000 (22:03 +0000)
committerJason Rumney <jasonr@gnu.org>
Wed, 4 Jun 2003 22:03:44 +0000 (22:03 +0000)
WHEEL_EVENT events.

src/macterm.c

index 0bcf85f6ff2b586d22285196e954b900784c0c33..f087c78870e8e3ee8cf387a522383ba5d62a2e4e 100644 (file)
@@ -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);