]> code.delx.au - gnu-emacs/blobdiff - src/macterm.c
*** empty log message ***
[gnu-emacs] / src / macterm.c
index 0bcf85f6ff2b586d22285196e954b900784c0c33..d00c1d690ac305f008c3599ec336e68a09c35537 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);
@@ -8592,6 +8594,7 @@ mac_check_for_quit_char ()
       struct mac_output *mwp =
        (mac_output *) GetWRefCon (FrontNonFloatingWindow ());
       /* Use an input_event to emulate what the interrupt handler does. */
+      EVENT_INIT (e);
       e.kind = ASCII_KEYSTROKE_EVENT;
       e.code = quit_char;
       e.arg = NULL;