Ginn fails to work for finish events
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ginn |
New
|
Undecided
|
Unassigned |
Bug Description
Trying to get 'back' and 'forward' to work in my browser with a Magic Trackpad using Ginn, I discovered a fundamental problem. 'finish' events are unlikely to work at all because of assumptions Ginn makes about the underlying library, Geis.
First, empirical testing shows that the delta-x and delta-y values for the gesture in the finishing callback are useless. X always appears to be Zero, and Y appears to be a random value. Second, the gesture matching uses the number of touches reported as part of the very last event in order to do it's matching. However, at least for this device and my setup, the number of touches is 1 unless you manage to remove all your fingers from the pad at EXACTLY the same instant.
I was able to patch a local copy of Ginn to get around this by storing the number of touches at the start as well as the position at the of the gesture, and then during the finish message using the finish position to calculate the offset, and overwriting the final number of touches with the starting number. A better strategy would probably be to use either the maximum number of touches seen, or the touch number that appears most frequently in the updates for the gesture.