artginzburg / MiddleClick-Sonoma

 "Wheel click" with three-finger click/tap for Trackpad and Magic Mouse.
GNU General Public License v3.0
1.47k stars 85 forks source link

Fixed two-finger tap not working #36

Closed ASHIJANKEN closed 1 year ago

ASHIJANKEN commented 2 years ago

Hello.

I found that the middle-click with the two-finger tap doesn't work when I changed a setting with the command below. $ defaults write com.rouge41.middleClick fingers 2

In my investigation, f3->normalized.pos.x and f3->normalized.pos.y were "nan" when two-finger tap was triggered. Consequently, middleclickX, middleclickY, middleclickX2, and middleclickY2 were "nan", so the condition delta < 0.4f at l.228 didn't work well.

I think the number of ((Finger *)&data[i])->normalized.pos should be aligned with fingersQua.

ASHIJANKEN commented 1 year ago

Hi @artginzburg , Thank you for approving my pull request! I'd appreciate it if you merge it because I don't have write access.