flxzt / rnote

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

Canvas goes crazy after moving or zooming it #1215

Open iCromix opened 2 months ago

iCromix commented 2 months 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 2 months 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 2 months 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 2 months 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 2 months ago

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

Doublonmousse commented 2 months 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 2 months 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 2 months 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.

christmascoding commented 2 days ago

I have a very similar issue! When zooming using CTRL + "+", my canvas goes crazy! Especially with larger files, it seems. I'm on a 2-in-1 Laptop (Lenovo L13 Yoga Gen 2) with PoP_OS on 22.04. In the video, i am doing the scrolling using my mousepad, not the touchscreen.

My issue is only persistent with zooming, however. I have not experienced this when scrolling or moving the canvas. It seems to be zooming into seemingly random spots on the screen.

I'll try to log it after my exams. Screencast+from+11-28-2024+05_38_55+PM.webm