Bug 479706 - Cursor appearance does not update correctly when using a tablet pen
Summary: Cursor appearance does not update correctly when using a tablet pen
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: input (show other bugs)
Version: 5.91.0
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-01-12 19:04 UTC by Kath
Modified: 2024-01-20 15:16 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Example of cursor behavious when using a mouse (1.10 MB, video/webm)
2024-01-12 19:05 UTC, Kath
Details
Example of cursor behaviour when using a tablet pen (1.22 MB, video/webm)
2024-01-12 19:05 UTC, Kath
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kath 2024-01-12 19:04:55 UTC
SUMMARY
When using a graphics tablet pen to control the cursor, the cursor often does not update its appearance correctly when interacting with UI elements that should change it (For example, selecting tools in GIMP, resizing windows, etc)

The precise behavior depends on the application: 
- In GIMP (GTK2), the cursor's appearance will not update until the pen is removed from the tablet completely (causing the cursor to disappear) and brought back into range. 
- In QT applications such as Dolphin, the cursor always appears as a crosshair, regardless of what is being done. Removing the pen from the tablet has no effect.
- The cursor behaves correctly in Firefox, Chrome and the GTK3 Beta of GIMP

STEPS TO REPRODUCE
1. Launch GIMP with a graphics tablet connected
2. Create a new image
3. Select a tool using the tablet pen's cursor

OBSERVED RESULT
The cursor's appearance does not update to reflect the tool selection.

EXPECTED RESULT
The cursor's appearance updates to reflect the tool selection.

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.91.90
KDE Frameworks Version: 5.248.0
Qt Version: 6.6.1
Kernel Version: 6.2.0-39-generic (64-bit)
Graphics Platform: Wayland
Processors: 16 × Intel® Core™ i9-9900K CPU @ 3.60GHz
Memory: 31.1 GiB of RAM
Graphics Processor: llvmpipe

ADDITIONAL INFORMATION
This issue only occurs in the Wayland session. The shared cursor in X11 session does not suffer from this problem.

I am using a Wacom Intuos Art Small, CTH-490/K
Comment 1 Kath 2024-01-12 19:05:31 UTC
Created attachment 164850 [details]
Example of cursor behavious when using a mouse

Please ignore the laggy appearance of the cursor, that's an issue with the screen recording, cursor movement was smooth in practice.
Comment 2 Kath 2024-01-12 19:05:52 UTC
Created attachment 164851 [details]
Example of cursor behaviour when using a tablet pen

Please ignore the laggy appearance of the cursor, that's an issue with the screen recording, cursor movement was smooth in practice.
Comment 3 Zamundaaa 2024-01-12 19:16:52 UTC
Setting an appropriate tablet cursor is up to the application / toolkit. It not changing to a resize cursor when windows are resized is something we can fix though
Comment 4 David Edmundson 2024-01-17 15:28:03 UTC
And we need to fix Qt, which we should take care of
Comment 5 Kath 2024-01-18 21:41:46 UTC
Upon further investigation, the GIMP issue I noticed in the original summary (where the cursor does not update until the pen is removed and brought back into range) actually occurs in all XWayland applications, such as Wine.

I also noticed that the issue does not occur when using Wine's experimental Wayland driver.
I very briefly tried GIMP on a Fedora with Gnome live USB and could not reproduce the issue.
 
Would this point to an issue in Plasma, or perhaps XWayland?
Comment 6 Nicolas Fella 2024-01-20 15:16:59 UTC
There's a few different issues here:

- Wayland-native Qt applications only having a crosshair cursor is https://bugreports.qt.io/browse/QTBUG-105843
- XWayland windows having broken cursor shapes: https://bugs.kde.org/show_bug.cgi?id=480096
- Other toolkits may have their own bugs