iberianpig / xSwipe

Multitouch gestures with synaptics driver on X11, Linux
452 stars 56 forks source link

The function getAxis should be improved #54

Open linweilian03 opened 6 years ago

linweilian03 commented 6 years ago

Run command "synclient -l " , it shows that (part of the result): LeftEdge = 1132 RightEdge = 5690 TopEdge = 919 BottomEdge = 4888 This means the synclient believes that my touchpad is 5690-1132=4558 wide, and 4880-919=3961 high. So the xswipe believe that the ratio of width:height=4558:3961=1.15. However, I used a ruler to physically measure my touchpad. The ruler shows that my touchpad is actually 8.2cm wide and 4.8cm high. The ratio of width:height is actually 8.2:4.8=1.7. So the xswipe make a mistake in judging your swipe gesture is vertical or horizontal. In my example, the xSwipe is more likely to take some horizontal gesture as vertical gestures. So I change the code of getAxis " if($xDist > $yDist)" to " if(1.5*$xDist > $yDist)" Now, it's much better. Maybe some parameters can be added, such as width, height , to solve this problem.