From 570c054a6f95000c040f319ab039808b15cd8533 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Thu, 19 Dec 2013 08:38:08 +0100 Subject: [PATCH] Generate HORIZ_WHEEL_EVENT. * nsterm.m (mouseDown:): Generate HORIZ_WHEEL_EVENT. --- src/ChangeLog | 4 ++++ src/nsterm.m | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index eaec5dd97dc..d6db5b30e0c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2013-12-19 Anders Lindgren + + * nsterm.m (mouseDown:): Generate HORIZ_WHEEL_EVENT. + 2013-12-18 Paul Eggert Minor fixes for recent openp changes. diff --git a/src/nsterm.m b/src/nsterm.m index 733c05ae53a..99c061d16bc 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -5498,8 +5498,18 @@ not_in_argv (NSString *arg) CGFloat delta = [theEvent deltaY]; /* Mac notebooks send wheel events w/delta =0 when trackpad scrolling */ if (delta == 0) - return; - emacs_event->kind = WHEEL_EVENT; + { + delta = [theEvent deltaX]; + if (delta == 0) + { + NSTRACE (deltaIsZero); + return; + } + emacs_event->kind = HORIZ_WHEEL_EVENT; + } + else + emacs_event->kind = WHEEL_EVENT; + emacs_event->code = 0; emacs_event->modifiers = EV_MODIFIERS (theEvent) | ((delta > 0) ? up_modifier : down_modifier); -- 2.39.2