Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2012-12-20 16:01:15 +0400
committerTon Roosendaal <ton@blender.org>2012-12-20 16:01:15 +0400
commit8914433cd0ba38b27d8934d3fe7c8d52eb819b19 (patch)
treed8c181221dddf7727f86d6f8dbaa97aa5f68639f /intern
parent4e2bc939c1da6dcabe8efd62266b8e0f47f6cc0f (diff)
Bug fix #28915 and #33538
Mac OS X trackpad and 'mighty mouse' fix. An old commit from Damien in 2010 tried to make mighty mouse touches work as if this is a scrollwheel. The error in that code was that the "kinetic scrolling" feature failed. When releasing your fingers, the events passed on to Blender then switched from "trackpad pan" to "mousewheel zoom". This commit makes trackpads and mighty mouse behave identical. Only difference is that trackpad panning needs 2 fingers, mighty mouse only one. Note that trackpad and mighty mouse 3d zoom works with holding ctrl! All works nice with this kinetic feature now. Fun :)
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.h2
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.mm10
2 files changed, 1 insertions, 11 deletions
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.h b/intern/ghost/intern/GHOST_SystemCocoa.h
index 9162b7ce4e0..a1b372dac9a 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.h
+++ b/intern/ghost/intern/GHOST_SystemCocoa.h
@@ -296,8 +296,6 @@ protected:
/** Multitouch trackpad availability */
bool m_hasMultiTouchTrackpad;
- /** Multitouch gesture in progress, useful to distinguish trackpad from mouse scroll events */
- bool m_isGestureInProgress;
};
#endif // __GHOST_SYSTEMCOCOA_H__
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm
index aca1a4071d8..39fd038d568 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.mm
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@ -551,7 +551,6 @@ GHOST_SystemCocoa::GHOST_SystemCocoa()
char *rstring = NULL;
m_modifierMask =0;
- m_isGestureInProgress = false;
m_cursorDelta_x=0;
m_cursorDelta_y=0;
m_outsideLoopEventProcessed = false;
@@ -1580,8 +1579,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
case NSScrollWheel:
{
- /* Send trackpad event if inside a trackpad gesture, send wheel event otherwise */
- if (!m_hasMultiTouchTrackpad || !m_isGestureInProgress) {
+ if (!m_hasMultiTouchTrackpad) {
GHOST_TInt32 delta;
double deltaF = [event deltaY];
@@ -1641,12 +1639,6 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
pushEvent(new GHOST_EventTrackpad([event timestamp] * 1000, window, GHOST_kTrackpadEventRotate, x, y,
-[event rotation] * 5.0, 0));
}
- case NSEventTypeBeginGesture:
- m_isGestureInProgress = true;
- break;
- case NSEventTypeEndGesture:
- m_isGestureInProgress = false;
- break;
default:
return GHOST_kFailure;
break;