From: Jan Djärv Date: Thu, 19 Dec 2013 07:38:08 +0000 (+0100) Subject: Generate HORIZ_WHEEL_EVENT. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~330 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=570c054a6f95000c040f319ab039808b15cd8533;p=emacs.git Generate HORIZ_WHEEL_EVENT. * nsterm.m (mouseDown:): Generate HORIZ_WHEEL_EVENT. --- 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);