flxzt / rnote

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

"Copy Cut Paste" menu appearing when it should not #1220

Open lokman2k5 opened 1 week ago

lokman2k5 commented 1 week ago

When I am using the app with my touchscreen, A menu on the top-left corner sometimes appears and stops whatever I am doing(eg scrolling), I'd have to click again anywhere on the screen to make it go away

Console Output
2024-09-17T17:06:43.919340Z DEBUG rnote: .. tracing subscriber initialized.

Screenshots
Screenshot from 2024-09-17 20-01-34

Desktop (please complete the following information):

Additional context
I am using a thinkpad yoga x1 3rd gen. with a wacom ISDv4 5148 (builtin touchscreen)

Doublonmousse commented 1 week ago

My hope is that I can prevent this from happening based on the position x,y returned for the popup (either 0,0 or some incorrect position)

I can't find a related gtk issue (there was no change on the rnote side that would explain the sudden apparition of this bug, it didn't happen with gtk 4.12 and happens with 4.14 and 4.16). I though I saw something similar though, will search some more (and probably open a new issue)

lokman2k5 commented 1 week ago

I think then we should report this to gnome? they will also tell us that it's unrelated to gtk and we should report it back to the application dev, wouldn't they?

flxzt commented 1 week ago

No I think it has to do more with how the long-press gesture is activated - it seems to be a regression that got introduced by #1134

lokman2k5 commented 1 week ago

if i long-press using fingers, it shows the same dialogue(copy cut paste) but it vanishes as soon as i left my fingers to select an option

Doublonmousse commented 1 week ago

So the position is (0,0) when this occurs, so we can ignore it when that happens

image

Also a slew of broken accounting messages cause gtk ...

Edit : this didn't work

Doublonmousse commented 1 week ago

The best I can do is do the same thing as before if (x,y) is not close to (0,0) and if not, present then immediately close the popup.

This at least doesn't totally break the right click (whereas doing nothing does, no right click will ever work after the first spurrious one gets rejected) but it breaks other gestures (because everytime the spurrious menu is called, the current gesture is interrupted). So things like zooming with two fingers can stop working midway through the gesture

lokman2k5 commented 1 week ago

can't we create something like a timeout? like wait this much seconds and only then show the popup, do not show it if scrolling or not pressing for like 5 seconds, only show it if a single finger is pressing for 5 seconds, isn't that possible? if not, why not?

lokman2k5 commented 1 week ago

I found these issues that I can actually confirm on the gnome bug tracker, might be related: https://gitlab.gnome.org/GNOME/gtk/-/issues/5540 (this is on the top left corner as well, so that confirms it) https://gitlab.gnome.org/GNOME/nautilus/-/issues/2872