rnote icon indicating copy to clipboard operation
rnote copied to clipboard

Option to disable/stop scrolling while drawing

Open puyral opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe.
When one initiates a scroll (with touch or trackpad) it is possible to start drawing while continuing to scroll. This can be quite annoying when one mistakenly starts to scroll just before writing because of poor palm rejection. It seems that it also applies to inertial scrolling.

Describe the solution you'd like
It would be nice to be able to stop any scrolling when the pen gets near / start drawing.

Describe alternatives you've considered
I've looked into disabling the touchscreen entirely, but it doesn't seem possible either.

Additional context
Palm rejection is a difficult problem (but I must say that I'm amazed how well it works already) this should help sidestep the issue.

puyral avatar Oct 03 '24 17:10 puyral

I've been fairly successfull at deactivating touch input on demand: https://github.com/puyral/rnote/tree/add-block-touch

This add a buton on the header (next to the focus mode) that deactivate all touch event (that I couls find) on the canvas. Therefore the app will ignore any incorrect touch input (due to poor palm rejection) while keeping the touch capabilities for the rest of the app.

This is my first time ever modifying a GTK app, so I'm assuming I broke many thing.

puyral avatar Oct 07 '24 18:10 puyral

Pretty similar to #1055. The code looks pretty good.

A few notes though (maybe open a PR for it, i'll be easier to comment)

https://github.com/flxzt/rnote/compare/main...puyral:rnote:add-block-touch#diff-5a05f1fbb8c3c6082ec6bfadb2b457446578b7af7aa2f1367aafb3730e2b8f31R254 -> bad copy/paste here (wrong name duplicated from above, you're not loading the correct variable here)

https://github.com/flxzt/rnote/compare/main...puyral:rnote:add-block-touch#diff-5a05f1fbb8c3c6082ec6bfadb2b457446578b7af7aa2f1367aafb3730e2b8f31R421 Is changing the propagating phase of the drag gesture not enough ? Is it to stop a canvas drag gesture that's in progress when toggling the option ? (Because of inertial scrolling)

Doublonmousse avatar Oct 12 '24 04:10 Doublonmousse

Hey, @puyral Could you open a pull request for your code? I think it would be greatly appreciated.

PhilDevProg avatar Mar 10 '25 12:03 PhilDevProg

Done !

Sorry, I didn't have GitHub notifications set up in October, so this flew under my radar...

This was also the occasion for me to make a real development environment for rnote so I should be able to clean things up much better than I could before.

puyral avatar Mar 11 '25 00:03 puyral