Bug 467061 - XWayland apps have a slightly blurry mouse cursor when using scaling
Summary: XWayland apps have a slightly blurry mouse cursor when using scaling
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.27.8
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 465306 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-03-08 16:15 UTC by Alexander Sanderson
Modified: 2024-03-04 10:22 UTC (History)
7 users (show)

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


Attachments
Cursor when hovering over the title bar of the XWayland app (it is sharp) (7.05 KB, image/png)
2023-03-08 16:17 UTC, Alexander Sanderson
Details
Cursor when hovering over the main window of the XWayland app (it is blurry) (7.01 KB, image/png)
2023-03-08 16:18 UTC, Alexander Sanderson
Details
Video of the blurry cursor on xWayland windows compared to Wayland-native windows (916.73 KB, video/mp4)
2023-10-19 19:08 UTC, Hexagon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Sanderson 2023-03-08 16:15:37 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
XWayland apps have a slightly blurry cursor when using fractional scaling. It's worth pointing out that this isn't with the "scaled by the system" setting that incurs window blur enabled; this is using the default "apply scaling themselves" that allows many XWayland apps to fractional scale without blur. Thus, the main window is sharp, but the mouse cursor is not.

STEPS TO REPRODUCE
1. Set KDE Plasma to 125% or 150% fractional scaling in System Settings (and reboot).
2. Open an XWayland app.
3. Move the mouse between the title bar and the main window body.

OBSERVED RESULT
The cursor is slightly blurry when hovering over the main window, but sharp when hovering over the title bar.

EXPECTED RESULT
The cursor should be sharp regardless of whether it's on the main window or title bar.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 5.27.2
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Comment 1 Alexander Sanderson 2023-03-08 16:17:57 UTC
Created attachment 157116 [details]
Cursor when hovering over the title bar of the XWayland app (it is sharp)
Comment 2 Alexander Sanderson 2023-03-08 16:18:22 UTC
Created attachment 157117 [details]
Cursor when hovering over the main window of the XWayland app (it is blurry)
Comment 3 David Edmundson 2023-03-16 22:03:20 UTC
*** Bug 465306 has been marked as a duplicate of this bug. ***
Comment 4 Hexagon 2023-04-20 15:58:13 UTC
I can confirm this behavior. Additional information:
I am using the default Plasma cursor theme (Breeze)
In the display settings I am using: Legacy Applications (X11): Apply scaling themselves

- It also happens when using an integer scaling factor f.e. 200%
- The blurryness also applies to all other symbols of the mouse cursor theme like the hand symbol or the arrow symbol when resizing windows
- In some xWayland applications one can see just a blurry version of the Breeze cursor; in other applications one can see a blurry version of the Adwaita cursor theme. So some xWayland applications seem to honor the cursor theme that was set in the Plasma settings and others default to the Adwaita cursor theme.
Comment 5 Hexagon 2023-10-19 19:08:50 UTC
Created attachment 162431 [details]
Video of the blurry cursor on xWayland windows compared to Wayland-native windows

The problem is still present on Plasma 5.27.8. This video shows the problem more clearly than the previous screenshots. The bottom is the Wayland-native Plasma panel where the cursor is sharp. The top is Discord running in xWayland where the cursor is blurry / in low resolution.
Comment 6 Zamundaaa 2023-10-20 00:12:50 UTC
This should be fixed in Plasma 6 with https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2792
Comment 7 Naxdy 2024-03-01 19:45:55 UTC
I'm able to reproduce this issue in NixOS using Plasma 6.0. Not fixed?
Comment 8 Vlad Zahorodnii 2024-03-04 08:57:13 UTC
(In reply to Naxdy from comment #7)
> I'm able to reproduce this issue in NixOS using Plasma 6.0. Not fixed?

What cursor theme do you use?
Comment 9 Naxdy 2024-03-04 08:58:03 UTC
I use Vimix cursors: https://github.com/vinceliuice/Vimix-cursors
Comment 10 Vlad Zahorodnii 2024-03-04 09:00:44 UTC
That cursor theme needs to provide more sizes like breeze cursor theme
Comment 11 Naxdy 2024-03-04 09:24:43 UTC
Switched to the Breeze theme (black), but I can still reproduce the issue unfortunately.
Comment 12 Vlad Zahorodnii 2024-03-04 09:38:30 UTC
what's the scale factor?
Comment 13 Vlad Zahorodnii 2024-03-04 09:39:18 UTC
and configured cursor size too
Comment 14 Naxdy 2024-03-04 09:40:11 UTC
scale factor 200%, screen resolution 3840x2400, cursor size 24
Comment 15 Vlad Zahorodnii 2024-03-04 10:22:11 UTC
As discussed on matrix, xsettings needs to be installed so gtk apps pick up the scaled cursor size setting.