Bug 477675 - KWin doesn't correctly clear cursor surface when switching to a smaller cursor size
Summary: KWin doesn't correctly clear cursor surface when switching to a smaller curso...
Status: RESOLVED MOVED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-28 13:59 UTC by Emilio Cobos Álvarez (:emilio)
Modified: 2023-11-29 11:58 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emilio Cobos Álvarez (:emilio) 2023-11-28 13:59:50 UTC
SUMMARY

When using a small custom image in Firefox as the cursor, only on KWin on Wayland, rests of the previous cursor remain on the area not covered by it.

STEPS TO REPRODUCE
1. On Firefox, running on Wayland, go to https://crisal.io/tmp/svg-cursor-kwin.html, and hover over the website area.

For convenience, since I plan to workaround this bug in Firefox:

```
$ pip install --user mozregression
$ MOZ_ENABLE_WAYLAND=1 mozregression --launch 120 -a https://crisal.io/tmp/svg-cursor-kwin.html
```

OBSERVED RESULT

Pieces of the old cursor remain.

EXPECTED RESULT

Only the specified cursor surface is used.

SOFTWARE/OS VERSIONS

Operating System: Arch Linux 
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.112.0
Qt Version: 5.15.11
Kernel Version: 6.6.2-arch1-1 (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION

I'd attach a screenshot, but annoyingly, neither OBS nor Spectacle show the artifacts.
Comment 1 Vlad Zahorodnii 2023-11-28 15:31:56 UTC
I've been debugging this issue a while ago and I wanted to discuss it with you on matrix, but I couldn't find you.

The culprit of this bug is that firefox reports incomplete damage when the cursor shrinks.
Comment 2 Vlad Zahorodnii 2023-11-28 15:32:11 UTC
I'd been debugging*
Comment 3 Vlad Zahorodnii 2023-11-28 15:36:56 UTC
Another website with similar issue: http://9front.org/
Comment 4 Emilio Cobos Álvarez (:emilio) 2023-11-28 16:43:21 UTC
Huh, I somehow got kicked from the kwin matrix room or something a while ago it seems?

We only call gtk APIs for this so probably other gtk applications suffer from the same issue. But thanks, that's a great pointer, I can debug it a little bit more on the gtk side.
Comment 5 Emilio Cobos Álvarez (:emilio) 2023-11-29 11:58:04 UTC
https://gitlab.gnome.org/GNOME/gtk/-/issues/6242