Bug 422548 - Cursors do not respect scale factor on X11
Summary: Cursors do not respect scale factor on X11
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 423934 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-06-06 19:44 UTC by Nate Graham
Modified: 2021-05-02 08:33 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
nate: Wayland-
nate: X11+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.