Community
Participate
Working Groups
I tried Snippet353 but the swipe gesture is never recognized. (http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet353.java?view=co) I am using Mac OSX Lion, Java 1.6.0_26-b03-383 from Apple Eclipse Juno 4.2M4 cocoa 64bit. Could be similar to bug 349812.
Same with Eclipse 3.8.1 cocoa 64bit
This happens on Lion, both 32 and 64 bit. The default behavior of 3 finger swipe has changed in Lion and can be controlled by the System Preferences. Here is an article on setting the preference --> http://www.macworld.com/article/161886/2011/08/restore_snow_leopards_three_finger_swipes_in_lion.html With the three finger swipe enabled in the preferences, SWT recognizes the 3 finger swipe gesture.
Also, if the 3 finger swipe is not enabled in the preferences, then holding down the option key with 3 finger swipe causes the swipe gesture event.
OK, I see. It's a pity beause it will be hard to ship SWT applications that only work if you have the right OS settings. If there isn't anything we could do to change that, it deosn't seem to make sense to rely on gesture support. :-( Thanks for your hints anyway. As for me, this ticket can be closed.
There is a difference between SWIPE and PAN even when using only two fingers. SWIPE is a quick flick in the direction of left or right. PAN is a slow movement in either direction. I guess this could be handled by carefully implementing the GestureListener but it would be better if SWT handled it properly. I would be surprised if Cocoa don't have an API for this.
Sravan found that swipe also doesn't work on Windows 8.1, so at least we don't have a platform difference here. To make swipe work with two fingers on the Mac, I guess SWT would somehow have to inform the OS that the PAN gesture was not actually consumed, and then the OS could try the next applicable gesture. A problem could be that SWT/cocoa currently uses Control/Composite#scrollWheel(..) to create GESTURE_PAN events. That's maybe too late for the OS to fall back to the SWIPE event.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
I can confirm that this is still an issue on macOS 10.15. There is some related information on how to implement a fallback to PAN after SWIPE failes in this Apple documentation[1]. [1] https://developer.apple.com/documentation/uikit/touches_presses_and_gestures/coordinating_multiple_gesture_recognizers/preferring_one_gesture_over_another