Bug 447432

Summary: Cursor size inconsistent between windows on hi DPI display wayland
Product: [Plasma] kwin Reporter: Eric Edlund <ericedlund2017>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: ericedlund2017
Priority: NOR Flags: ericedlund2017: Wayland+
Version First Reported In: 5.23.4   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Pictures of over system vs other window

Description Eric Edlund 2021-12-23 15:08:04 UTC
Created attachment 144810 [details]
Pictures of over system vs other window

SUMMARY
I'm on an Acer Spin 5 with a 144 dpi display using wayland. The cursor scale is inconsistent.


STEPS TO REPRODUCE
1.  Using breeze cursor theme on Hi DPI display (144)
2. Move cursor from a chrome window (or Firefox, or spotify) to the desktop (or the system settings app, or krunner)

OBSERVED RESULT
Cursor becomes larger on system apps.

EXPECTED RESULT
Cursor size remains consistent

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Neon 5.23 User Edition
(available in About System)
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Comment 1 Eric Edlund 2021-12-24 20:49:17 UTC
Cursor size is set to 36 to reproduce. I had to reboot to update the size. When size is 48, the cursor is the same size on all windows.
Comment 2 Vlad Zahorodnii 2022-01-11 08:49:00 UTC
Do you use fractional scaling (1.5x), right?
Comment 3 Eric Edlund 2022-01-11 11:53:06 UTC
(In reply to Vlad Zahorodnii from comment #2)
> Do you use fractional scaling (1.5x), right?

Yes, 1.5x
Comment 4 Vlad Zahorodnii 2022-01-12 13:27:05 UTC
> Cursor size is set to 36 to reproduce. I had to reboot to update the size. When size is 48

Aha! This and the scale factor of 1.5x explains why the cursor is different. QtWayland scales the cursor size by the output scale factor. If the cursor theme has no the given size, it will pick the closest. Can you file a Qt bug report and link it here?
Comment 5 Eric Edlund 2022-01-12 14:52:01 UTC
(In reply to Vlad Zahorodnii from comment #4)
> > Cursor size is set to 36 to reproduce. I had to reboot to update the size. When size is 48
> 
> Aha! This and the scale factor of 1.5x explains why the cursor is different.
> QtWayland scales the cursor size by the output scale factor. If the cursor
> theme has no the given size, it will pick the closest. Can you file a Qt bug
> report and link it here?

I think it would make more sense if you filed a report, I don't have details. Unless you're as unversed in qt and c++ as I am, in which case I could start muddling through source code.