diff options
author | Ton Roosendaal <ton@blender.org> | 2013-01-05 21:13:07 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2013-01-05 21:13:07 +0400 |
commit | 8dfe7620fb7df5bc4adb6bc4b42bd3343dce3f74 (patch) | |
tree | ebb94e5a446977fbd86d71f496723a614183a699 /intern | |
parent | 123191881b02a12f90a402650d043c2ac66e7f99 (diff) |
New version of code to detect whether a wheel is involved, or a trackpad.
It was compiled with "deploy target 10.6" tested on macbook with 10.8.
More tests follow quick.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemCocoa.mm | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index 2d9d89d9ad0..d219679f1f9 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -1576,14 +1576,17 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr) } } break; + case NSEventTypeBeginGesture: + m_hasMultiTouchTrackpad = 1; + break; + case NSEventTypeEndGesture: + m_hasMultiTouchTrackpad = 0; + break; case NSScrollWheel: { - int momentum = 0; -#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 - m_hasMultiTouchTrackpad = 0; - momentum = [event momentumPhase] || [event phase]; -#endif + int momentum = [event momentumPhase]; + /* standard scrollwheel case */ if (!m_hasMultiTouchTrackpad && momentum == 0) { GHOST_TInt32 delta; |