Using a graphic pad on windows causes 2 pointers to exist at once
Describe the bug
When placing the mouse pointer anywhere then using the graphic pad there are two pointers. One is the actual mouse pointer and the other only exists within Rnote. Only the second pointer shows up on screen, however when recording with OBS only the mouse pointer shows up in the video.
When using the eraser via right click, both pointers use the eraser, which results in random bits of the writings on the page being erased.
To Reproduce
Steps to reproduce the behavior:
- Use mouse to move pointer to a position
- Use H610X to move pointer and draw
- Press right click via the graphic pad buttons(bound to temporary eraser tool)
- There are two pointers and the right click action happens on both
Expected behavior
For there to only be one pointer or if there is more than one pointer for only one of them to be performing each action.
Console Output
Screenshots
https://github.com/user-attachments/assets/c9e7081d-0769-4b81-962b-4f67c1a40a68
https://github.com/user-attachments/assets/51481b0c-453d-4527-b515-f8738b63a420
Desktop (please complete the following information):
- OS: Edition Windows 10 Pro Version 22H2 Build 19045.6466
- App Version: Rnote v0.13.1
- Installation Source: 13.1 Release on this repo
- Desktop Environment:
- Display Server:
- Input Source: Mouse and Keyboard, Huion H610X External Graphics Tablet
Additional context
Add any other context about the problem here.
The double cursor part is kind of the norm unfortunately with modern pen input (as in a right click from something seen as a mouse will trigger a right click action at the last position of the mouse, unmodified by any pen input in between).
Maybe that can be relieved by checking the change of device between the two actions. But this also looks very similar to #665 so I'm not that hopeful this way doesn't also introduces new issues.
Doing consistency checks for event to reject some of them seems somewhat possible (although I'm not sure it pans out well in practice with false positives and false negatives)
The double cursor part is kind of the norm unfortunately with modern pen input (as in a right click from something seen as a mouse will trigger a right click action at the last position of the mouse, unmodified by any pen input in between).
Maybe that can be relieved by checking the change of device between the two actions. But this also looks very similar to #665 so I'm not that hopeful this way doesn't also introduces new issues.
Doing consistency checks for event to reject some of them seems somewhat possible (although I'm not sure it pans out well in practice with false positives and false negatives)
If the mouse cursor would move along with the pen cursor that would be enough to mitigate much of it. There still would be the issue of erasing whatever is touched by the cursor at the moment of activation, but it would be a lot better