Bug 432766 - Kwin Decorations with 75% scaling on wayland
Summary: Kwin Decorations with 75% scaling on wayland
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: decorations (show other bugs)
Version: git master
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 431033 434322 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-02-10 21:56 UTC by Alexandre Pereira
Modified: 2022-02-07 13:50 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
3 monitors, left with 75% scaling (2.34 MB, image/png)
2021-02-10 21:56 UTC, Alexandre Pereira
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Pereira 2021-02-10 21:56:09 UTC
Created attachment 135580 [details]
3 monitors, left with 75% scaling

SUMMARY

I am using wayland session with 3 monitors, 2 2560x1440 and 1 1920x1080.
I am setting the 1920x1080 monitor with 75% scaling, so that it becomes 2560x1440 and is "similar" to the others.

Attached is a screenshot that shows that when windows are on the monitor with 75% scaling, the breeze decorations become broken. The red rectangles show the broken areas, and the green ones how it should be.
Also when I move the window back to the other monitors, the decoration becomes fixed. And when I move back to the 75% scaled monitor, they become broken.

I am posting this bug report, but sorry if its a duplicate of: 
* https://bugs.kde.org/show_bug.cgi?id=412089
* https://bugs.kde.org/show_bug.cgi?id=422342


STEPS TO REPRODUCE
1. Use wayland 
2. Set screen configuration to 75% scaling
3. Open a window with decoration

OBSERVED RESULT


EXPECTED RESULT


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

ADDITIONAL INFORMATION

Notice, this works properly with 75% scaling on X11 through xrandr.
Comment 1 Bug Janitor Service 2021-02-11 09:14:51 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/685
Comment 2 Vlad Zahorodnii 2021-02-11 12:06:54 UTC
Git commit 9ccae5eda67b67a8094e1a48e28a5bb3d584e6e0 by Vlad Zahorodnii.
Committed on 11/02/2021 at 12:06.
Pushed by vladz into branch 'master'.

platforms/wayland: Round up fractional scale factors

Currently, fractional scale factors that are less than 1 will be floored
to 0, which is a protocol violation.

M  +1    -1    src/plugins/platforms/wayland/egl_wayland_backend.cpp
M  +3    -1    src/plugins/platforms/wayland/scene_qpainter_wayland_backend.cpp
M  +1    -1    src/plugins/platforms/wayland/wayland_backend.cpp

https://invent.kde.org/plasma/kwin/commit/9ccae5eda67b67a8094e1a48e28a5bb3d584e6e0
Comment 3 Vlad Zahorodnii 2021-03-26 08:02:47 UTC
*** Bug 434322 has been marked as a duplicate of this bug. ***
Comment 4 Vlad Zahorodnii 2021-04-26 11:41:51 UTC
Git commit c9ac2e3fb811311701b81f745b63f35256a2cf3e by Vlad Zahorodnii.
Committed on 26/04/2021 at 11:41.
Pushed by vladz into branch 'master'.

decoration: Fix rendering issues with scale factors < 1

QPainter::setWindow() doesn't work as we expect if the device pixel
ratio of the paint device is less than 1, for example 0.5 or 0.75.

QPainter only allows the effective device pixel ratios that are greater
than or equal to 1. This restriction probably has to be lifted.

For the time being, this change introduces a helper function that can be
used to determine the scale factor by which QPainter::window() must be
multiplied.

M  +1    -1    src/decorations/decorationrenderer.cpp
M  +1    -1    src/plugins/scenes/opengl/scene_opengl.cpp
M  +1    -1    src/plugins/scenes/qpainter/scene_qpainter.cpp
M  +6    -0    src/utils.cpp
M  +9    -0    src/utils.h

https://invent.kde.org/plasma/kwin/commit/c9ac2e3fb811311701b81f745b63f35256a2cf3e
Comment 5 Patrick Silva 2021-05-31 14:36:37 UTC
*** Bug 431033 has been marked as a duplicate of this bug. ***
Comment 6 Alexandre Pereira 2022-02-07 12:14:04 UTC

*** This bug has been marked as a duplicate of bug 449681 ***