| Summary: | X11: painter passed to decoration doesn't have scaling information set properly on HiDPI screens | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | Janet Blackquill <uhhadd> |
| Component: | decorations | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED DOWNSTREAM | ||
| Severity: | normal | CC: | nate |
| Priority: | NOR | ||
| Version First Reported In: | git master | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Janet Blackquill
2021-01-12 21:53:00 UTC
Doing some digging, this looks like because the decoration queries the client for the scale which queries the Screens singleton for scale which queries the X11 output, which doesn't set the scale beyond m_backend->initialOutputScale(), which surprise surprise, doesn't change from its default of 1.0 on x11, only on Wayland. > This is not the case on X11, where it seems to always return 1.0.
That's correct. On X11, there is no concept of scale factors.
That doesn't make this not a bug. The rest of KWin's UI would be rendered at a different scale correctly as handled automatically by Qt, but fails to copy Qt's correct behaviour when using custom painting routines for UI elements. The image buffer physical size is already correctly adjusted by the scale factor; it simply doesn't have the correct scale information. > The image buffer physical size is already correctly adjusted by the scale factor
This is because the size of the buffer image is based on the font metrics. Screen scale factors should remain 1, otherwise we may break a lot of things. X11 was not designed with hidpi in mind.
Well, if you're insistent on not doing anything about this bug, I'll work around it in Breeze decorations then ¯\_(ツ)_/¯ But KScreen and Qt have a concept of scale factors on X11. Can't KWin just read from one of them? No, it's not that simple on X11 unfortunately. You are going to break a lot of things if you do that. |