Mercurial > emacs
changeset 51464:73188b413b0f
(XTread_socket): Map mouse wheel events to Emacs
WHEEL_EVENT events.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Wed, 04 Jun 2003 22:03:44 +0000 |
parents | 26fea2099cbc |
children | cd259af6d622 |
files | src/macterm.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/macterm.c Wed Jun 04 21:54:08 2003 +0000 +++ b/src/macterm.c Wed Jun 04 22:03:44 2003 +0000 @@ -7682,9 +7682,11 @@ 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);