Bug 479668

Summary: Software cursor image may left on last position on screen when moved to other
Product: [Plasma] kwin Reporter: Mykola Krachkovsky <w01dnick>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: jon9097, natator99, nate
Priority: NOR Keywords: qt6, wayland-only
Version First Reported In: 5.92.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=474771
Latest Commit: Version Fixed In: 6.0
Sentry Crash Report:

Description Mykola Krachkovsky 2024-01-11 21:48:23 UTC
SUMMARY
When software cursor (Intel GPU) moved from one screen (A) to another (B) its image may be left on screen A where it was before moving to screen B. If cursor area touches screen A even slightly in different screen region, old image disappears. It simpler to reproduce this bug when cursor moves fast from A to B.

STEPS TO REPRODUCE
1. Software cursor enabled.
2. Move cursor back and forth between two screens.

OBSERVED RESULT
Cursor image leftover.

EXPECTED RESULT
Only one cursor should be present.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE Tumbleweed 20240109
(available in About System)
KDE Plasma Version: 6.0.80
KDE Frameworks Version: 5.249.0
Qt Version: 6.6.1
KWin: 5.91.90git.20240111T181004~36222adb-78.1

ADDITIONAL INFORMATION
Sometimes its hard to see second cursor. I think some windows may affect it, it easier for me to reproduce it without any windows opened.
Comment 1 Vlad Zahorodnii 2024-01-12 11:31:21 UTC
I cannot reproduce it reliably though, which makes it difficult to fix
Comment 2 Bug Janitor Service 2024-01-12 12:17:00 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4896
Comment 3 Vlad Zahorodnii 2024-01-12 12:28:44 UTC
Git commit 1c15a6dd8875bf43bfc2eeb4d1383addec6a176c by Vlad Zahorodnii.
Committed on 12/01/2024 at 13:14.
Pushed by vladz into branch 'master'.

Fix software cursor stucking on old monitor

When the software cursor leaves an output, its RenderLayer is marked
as invisible and the area corresponding to the layer is scheduled to
be repainted in the output layer. However, the composite function only
checks whether the root RenderLayer needs a repaint, not the output
layer too.

M  +1    -1    src/compositor.cpp
M  +5    -0    src/core/outputlayer.cpp
M  +1    -0    src/core/outputlayer.h

https://invent.kde.org/plasma/kwin/-/commit/1c15a6dd8875bf43bfc2eeb4d1383addec6a176c
Comment 4 Vlad Zahorodnii 2024-01-12 13:04:47 UTC
Git commit 37b6092aefeba83efb157541f6d7d8801b8f8d8d by Vlad Zahorodnii.
Committed on 12/01/2024 at 13:39.
Pushed by vladz into branch 'Plasma/6.0'.

Fix software cursor stucking on old monitor

When the software cursor leaves an output, its RenderLayer is marked
as invisible and the area corresponding to the layer is scheduled to
be repainted in the output layer. However, the composite function only
checks whether the root RenderLayer needs a repaint, not the output
layer too.


(cherry picked from commit 1c15a6dd8875bf43bfc2eeb4d1383addec6a176c)

M  +1    -1    src/compositor.cpp
M  +5    -0    src/core/outputlayer.cpp
M  +1    -0    src/core/outputlayer.h

https://invent.kde.org/plasma/kwin/-/commit/37b6092aefeba83efb157541f6d7d8801b8f8d8d
Comment 5 Mykola Krachkovsky 2024-01-13 11:02:08 UTC
Thank you!
Comment 6 Nate Graham 2024-01-16 17:44:02 UTC
*** Bug 474771 has been marked as a duplicate of this bug. ***
Comment 7 fanzhuyifan 2024-02-25 03:25:39 UTC
*** Bug 481790 has been marked as a duplicate of this bug. ***