pguedes / gesticle

a libinput gesture daemon
GNU General Public License v3.0
3 stars 1 forks source link

two finger swipe gesture implementation #3

Open Alsan opened 4 years ago

Alsan commented 4 years ago

Add mac like two finger swipe gesture. Most of the changes are from my code formatter, hope you won't mind.

pguedes commented 4 years ago

hi @Alsan ,

thanks for the contribution!

have you tested this to see how it interacts with scrolling? i assumed 2 fingers were always used for scrolling... what to macs do with two finger gestures?

Alsan commented 4 years ago

Personally, I don't use Mac. As my understanding, there's no horizontal scroll in Mac, they use three fingers drag (the horizontal scroll bar, also apply to the vertical scroll bar) for scrolling, and two finger swipe horizontally is for switching desktop, just like I did.

My implementation, only two fingers swipe is captured. Two fingers swipe vertically or the drag event is ignored, they handled by libinput. And therefore, two fingers drag horzontally or vertically or simultaneously is possible for scrolling the window.

Alsan commented 4 years ago

Ok, just find someone with Mac to test the two finger horizontal scroll, they're supported with context. That means, they are scrolled when the windows with horizontal scrollbar and switching desktop if they don't.