RicardoEPRodrigues / magicmouse-hid

Magic Mouse 2 driver for Linux.
141 stars 14 forks source link

Add delay to mouse wheel event from drag start #3

Closed tanc closed 3 years ago

tanc commented 3 years ago

This adds a 1/5 of a second delay from the registration of a drag event to actually starting to scroll. The result is a slight decrease in sensitivity when dragging a finger on the Magic Mouse to start a scroll. The actual scrolling is the same as before, there is a just a small delay at the beginning of the stroke which helps to eliminate accidental scrolls when just resting the finger lightly on the mouse surface.

Related to #2

0x42h commented 3 years ago

Nice touch, @tanc (no pun intended 😉️). I'm a little (or should and now wish to be a) bit busy with other things right now, but I'd like to suggest to introduce a "touch start sensitivity area (from current position)" instead. When dragging windows now, for instance, it suddenly loses focus, because the window manager is receiving a scroll event, which isn't that hard to produce and even isn't not that hard not to produce. 🤪️

I was thinking about disabling scrolling altogether, but then you couldn't scroll on select (text). Not that that would be of any great importance, imho, but and/or still so, I believe this would cover al these cases. Makes sense?

RicardoEPRodrigues commented 3 years ago

I only now saw the pull request. For some reason, I had the notifications disabled. When I can I'll check it out!

RicardoEPRodrigues commented 3 years ago

Hello, @tanc !

Sorry for taking too long, but I finally had the time to look into your code. I changed it a bit and merged it into master.

Please take a look at https://github.com/RicardoEPRodrigues/Linux-Magic-Trackpad-2-Driver/commit/4b5acdb4f74e47d93e3a177842e6dc16e036024c and see what I changed.

Thank you for your work!