flxzt / rnote

Sketch and take handwritten notes.
https://rnote.flxzt.net
GNU General Public License v3.0
8.27k stars 287 forks source link

Canvas goes crazy after moving or zooming it #1215

Open iCromix opened 1 month ago

iCromix commented 1 month ago

Describe the bug
While trying to move or zoom the canvas it starts moving frenetically making it impossible to predict where it will end, this happens with small movements of the pen.

To Reproduce
Steps to reproduce the behavior:

  1. Select move or resize tool
  2. Use the tool on the canvas with slow movements
  3. The canvas starts moving erratically

Video

https://github.com/user-attachments/assets/e03885d0-8d14-43b5-84bf-999adf5806f5

Desktop (please complete the following information):

Additional context
It look's like it has something to do with pressure sensitivity since i've tried with the tablet in mouse mode and the issue didn't occur. I have a dual boot setup with Windows where this issue doesn't happen, in Linux i've tried the OpenTabletDriver and the official XP-Pen ones, same issue on both. Tried installing RNote from AUR and Flatpak, same issue too.

edwloef commented 1 month ago

To me this seems to be an issue when multiple input devices are affecting the window at the same time. Moving my mouse off of the rnote window makes moving the view with my drawing tablet work as expected.

iCromix commented 1 month ago

To me this seems to be an issue when multiple input devices are affecting the window at the same time. Moving my mouse off of the rnote window makes moving the view with my drawing tablet work as expected.

In my case the problem persist with the mouse off the rnote window, i've also tried unplugging the mouse using only the tablet but didn't work, same issue.

Doublonmousse commented 1 month ago

Please try to run rnote with the env variable RUST_LOG=trace, it will log every input event, and we can differentiate pen and mouse events this way (and also spot relatively easily cursor jumps from positions jumps between events)

edwloef commented 1 month ago

log.txt here's mine, with the mouse cursor on top of the window

Doublonmousse commented 1 month ago

Yeah I can see the mouse sending MotionNotify events in between pen events. The weird thing is the mouse coordinates move by quite a bit as well whilst the pen is down. Maybe a pen palm rejection issue ?

iCromix commented 1 month ago

Please try to run rnote with the env variable RUST_LOG=trace, it will log every input event, and we can differentiate pen and mouse events this way (and also spot relatively easily cursor jumps from positions jumps between events)

log.txt

I got that log while using the move canvas tool and grabbing the pen in a way that my palm wasn't close to the tablet at all (got the same issue)

edwloef commented 1 month ago

The weird thing is the mouse coordinates move by quite a bit as well whilst the pen is down

My mouse didn't move while creating this log, only the pen did.

Maybe a pen palm rejection issue ?

I'm using a One by Wacom, so I can't imagine this being the issue since there are no palm inputs to reject.