Bug 422548

Summary: Cursors do not respect scale factor on X11
Product: [Plasma] kwin Reporter: Nate Graham <nate>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: normal CC: eridanired123, kamikazow, karl, mike, philipp.reichmuth, postix, xaver.hugl
Priority: NOR Flags: nate: Wayland-
nate: X11+
Version: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Nate Graham 2020-06-06 19:44:50 UTC
OpenSUSE Tumbleweed with Qt 5.15 and all KDE software built from today's git master.

STEPS TO REPRODUCE
1. Set scale factor to 200%
2. Reboot

OBSERVED RESULT
Default 24px cursor is incredibly tiny and hard to find. You need to manually set it to 48px in the cursor KCM to make it the right size. And if you prefer a larger cursor (as I do) you're out of luck.

EXPECTED RESULT
The cursor size automatically scales with the systemwide scale factor. So for example a 24px cursor would get drawn at 48px when using a 200% scale factor. A 48px cursor would get drawn at 96px. And so on.
Comment 1 Nate Graham 2020-06-06 21:46:28 UTC
X11 is affected; Wayland is not.
Comment 2 phrxmd 2020-06-14 09:18:27 UTC
There is an underlying X issue here. You can see this from how cursor scaling depends on the window the cursor is over. E.g. if you set cursor size to 48px in the cursor KCM, the cursor still reverts back to tiny when you hover over an Xterm. Other applications where I'm observing this is the Brave browser where I'm now typing this, or the SoftMaker office package.

This is on OpenSUSE Tumbleweed with Qt 5.15, Plasma 5.19, Frameworks 5.70, Thinkpad Yoga X1 2560x1440 screen, scale factor set to 200%, cursor size set to 48px in the cursor KCM. Xft.dpi is set to 192 in .Xresources, and "xrdb -query all" reports Xcursor.size 48 (as set by the cursor KCM?).
Comment 3 Nate Graham 2020-07-07 19:47:36 UTC
*** Bug 423934 has been marked as a duplicate of this bug. ***
Comment 4 Vlad Zahorodnii 2020-07-30 08:15:26 UTC
The problem is that kwin ignores the scale factor on X11. Not sure how we can fix this bug.
Comment 5 Nate Graham 2020-07-30 12:55:52 UTC
Unhelpful comment: by making it respect the scale factor on X11! :D I'm here all week, folks...
Comment 6 Vlad Zahorodnii 2020-07-30 12:58:44 UTC
> Unhelpful comment: by making it respect the scale factor on X11!
We will break basically every application if we start honoring the scale factor.
Comment 7 Nate Graham 2020-07-30 13:00:53 UTC
Would it be possible to teach KWin how to respect the scale factor for things only under our control where we can make sure it doesn't break, then? E.g. the cursor, window decorations, the window decoration pop-up menu, etc.
Comment 8 Zamundaaa 2024-04-25 14:10:06 UTC
I think an inconsistent cursor size would be worse than just having the same wrong one always. It's not really fixable, and it works correctly on Wayland, so I'm closing this