harshadgavali / gnome-gesture-improvements

Touchpad gesture improvements for GNOME on Wayland/X11
https://extensions.gnome.org/extension/4245/gesture-improvements/
GNU General Public License v3.0
322 stars 40 forks source link

Four finger Hold and swipe (workspace switch) strange hitch feeling even with a 0ms delay. #195

Open peeweek opened 12 months ago

peeweek commented 12 months ago

Hello,

After weeks of using this wonderful extension, I switched back to windows, and I felt a really strange difference 4-finger in workspace switching, While on windows, the swipe is immediate, and do not require any hold gesture, using the extension involves a slight hitch before the swipe starts. I have tried putting a 0ms delay, but still, it feels somehow not as reactive as I would expect.

While browsing the code on how it runs, I stumbled upon this line:

https://github.com/harshadgavali/gnome-gesture-improvements/blob/f007cac312dc52144760177c35ba18e8a1029056/extension/src/swipeTracker.ts#L230

It seems that there is an additional clamped minimum of 100ms delay for swipe gesture, regardless the amount of milliseconds set in the preferences. From what I understand, regardless of what you configure, it will require at least 100ms of delay before the gesture will start being detected as a Hold/4-Finger-Swipe

I am not sure about the details, why this delay was implemented. Is it a safeguard to prevent glitches? or is it just something that could be removed to improve the reactivity of the gesture?

Thank you, again for the hard work and dedication, <3 your extension make my days even brighter

peeweek commented 12 months ago

After making some tests locally I was not able to reach the behavior that I expected, until I found this threshold in the constants that seems to be related to the swipe behavior :

https://github.com/harshadgavali/gnome-gesture-improvements/blob/f007cac312dc52144760177c35ba18e8a1029056/extension/constants.ts#L10

I tampered with the value, with relatively low values (down to 2) and it felt way better.

I know that this threshold is probably here for a reason. But it could be interesting to make it editable so users could adjust the sensitivity of the swipe threshold.