[KDE 6] Alt drag/zoom stops working after a short amount of time
Describe the bug
When using RNote on KDE 6, when using alt to scroll or to zoom, it stop working after a short amount of time, instead making a stroke instead
To Reproduce
Steps to reproduce the behavior:
- Install RNote and KDE 6
- Stay on draw mode
- use ALT to drag round
- Observe the behaviour
Expected behavior
It shouldn't stop scrolling/zooming.
Console Output
Run the app in the terminal with flatpak --env=RUST_LOG=rnote=debug --env=RUST_BACKTRACE=1 run com.github.flxzt.rnote
and post the output.
$ flatpak --env=RUST_LOG=rnote=debug --env=RUST_BACKTRACE=1 run com.github.flxzt.rnote
Note that the directories
'/var/lib/flatpak/exports/share'
'/home/ldas/.local/share/flatpak/exports/share'
are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.
2024-04-08T18:58:10.782024Z DEBUG rnote: .. tracing subscriber initialized.
(rnote:2): Gtk-CRITICAL **: 14:58:23.888: The layout manager of type GtkBoxLayout 0x59b50ebc2080 does not create GtkLayoutChild instances
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: EndeavourOS/Arch Linux
- App Version: 0.10.2 (?)
- Installation Source: AUR
- Desktop Environment: KDE 6 (latest)
- Display Server: Wayland
- Input Source: External Tablet + keyboard
Let me know if I've missed anything
You're using alt + pen to drag around right ? Can reproduce on windows, seems like it has to do with event handling.
The weird thing is that ALT is still there and seemingly detected and I'm not yet sure what's the reason the behavior suddenly changes.
Testing the other alt + drag possibility (alt + mouse and alt + touch with touch drawing enabled doesn't seem to have the same issue).
yes, i'm using alt+pen, as well as alt+shift+pen. tested it on SwayWM and it has the same issue. probably, as you said, event handling issues.
same issue, disabling windows ink fixes the problem but i lose pressure sensitivity, as mentioned on the duplicate issue
OS: Win 11 App Version: 0.10.2 Installation Source: .exe Input Source: External Graphics Tablet + keyboard
Same issue for me, but i'm on linux, not windows: OS: Fedora 40, Wayland, Hyprland App Version: 0.11.0 Installation: Flatpak Input Source: External Tablet + Keyboard
Is there anything I can do to help debug the issue further? I'm able to run rnote from source as well and could collect some additional debug information if needed.
@mrWinston The relevant code is here : https://github.com/flxzt/rnote/blob/2e0d148221879d2c98f80245fe9ccc4481f7bced/crates/rnote-ui/src/canvaswrapper.rs#L496-L525
Line 501 may be why though. For subsequent drags BUTTON1_MASK may be part of it or there might be other modifiers getting in here.
Maybe changing to something like gdk_modifiers.contains(gdk::ModifierType::ALT_MASK) but not containing shift or variations of this (alt + shift + drag is also another operation).
And looking at the same time at traces from crates/rnote-ui/src/canvas/input.rs for catching inputs that wouldn't be captured by the GestureDrag part.
I haven't looked in detail on why this happen. It's kinda working weird and in different ways depending on the target OS as well. On windows alt + pen drag can start drawing when changing the pressure applied.