[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53844] trunk/blender/intern/ghost/intern/ GHOST_SystemCocoa.mm: Mac OS X, Intuos tablet fix
Ton Roosendaal
ton at blender.org
Wed Jan 16 14:45:12 CET 2013
Revision: 53844
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53844
Author: ton
Date: 2013-01-16 13:45:11 +0000 (Wed, 16 Jan 2013)
Log Message:
-----------
Mac OS X, Intuos tablet fix
Touch input events map nicely to trackpad input now.
However, I noticed the event values are a factor 10 scaled larger compared
to other touch delta's. Makes using touch input on the tablet not so nice.
I found a hack to detect Wacom events, but if it works for more devices?
Anyway - for me the Wacom works perfectly smooth for view manipulations now.
Modified Paths:
--------------
trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm
Modified: trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm 2013-01-16 12:57:35 UTC (rev 53843)
+++ trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm 2013-01-16 13:45:11 UTC (rev 53844)
@@ -1599,7 +1599,8 @@
}
break;
- /* these events only happen on swiping trackpads */
+ /* these events only happen on swiping trackpads or tablets */
+ /* warning: using tablet + trackpad at same time frustrates this static variable */
case NSEventTypeBeginGesture:
m_hasMultiTouchTrackpad = 1;
break;
@@ -1633,9 +1634,17 @@
double dy;
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+ int phase = [event phase];
+
/* with 10.7 nice scrolling deltas are supported */
dx = [event scrollingDeltaX];
dy = [event scrollingDeltaY];
+
+ /* however, wacom tablet (intuos5) needs old deltas, it then has momentum and phase at zero */
+ if (phase == 0 && momentum==NULL) {
+ dx = [event deltaX];
+ dy = [event deltaY];
+ }
#else
/* trying to pretend you have nice scrolls... */
More information about the Bf-blender-cvs
mailing list