mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-07 20:30:32 -08:00
(XTread_socket): Map mouse wheel events to Emacs
WHEEL_EVENT events.
This commit is contained in:
parent
e9ec1a292f
commit
1beaad814a
1 changed files with 5 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue