Bug 520272 - Window decorations get broken in <100% scaling
Summary: Window decorations get broken in <100% scaling
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: decorations (other bugs)
Version First Reported In: 6.6.4
Platform: CachyOS Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-05-16 23:16 UTC by Lqdfcdr
Modified: 2026-05-20 13:03 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.6.6
Sentry Crash Report:


Attachments
Window with custom decorations at 75% scaling (218.46 KB, image/png)
2026-05-16 23:16 UTC, Lqdfcdr
Details
Window with breeze decorations at 75% scaling (238.15 KB, image/png)
2026-05-16 23:16 UTC, Lqdfcdr
Details
Window with custom decorations at 100% scaling (407.54 KB, image/png)
2026-05-16 23:19 UTC, Lqdfcdr
Details
Window with breeze decorations at 100% (368.61 KB, image/png)
2026-05-16 23:21 UTC, Lqdfcdr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lqdfcdr 2026-05-16 23:16:02 UTC
Created attachment 192368 [details]
Window with custom decorations at 75% scaling

DESCRIPTION
Non-default window decorations get broken when using anything less than 100% resolutions scaling. This happened back in update 6.6 back in february and it's quite annoying to be honest. 

STEPS TO REPRODUCE
1. Be on version 6.6.x
2. Use a custom window decoration
3. Set your resolution scaling to anything below 100%

OBSERVED RESULT
The decorations get missing in some parts of the window and the buttons seem offset. 

EXPECTED RESULT
The decorations should look anything abnormal.

SOFTWARE/OS VERSIONS
Operating System: CachyOS Linux 
KDE Plasma Version: 6.6.4
KDE Frameworks Version: 6.26.4
Qt Version: 6.11.0
Comment 1 Lqdfcdr 2026-05-16 23:16:57 UTC
Created attachment 192369 [details]
Window with breeze decorations at 75% scaling
Comment 2 Lqdfcdr 2026-05-16 23:19:38 UTC
Created attachment 192370 [details]
Window with custom decorations at 100% scaling
Comment 3 Lqdfcdr 2026-05-16 23:21:27 UTC
Created attachment 192371 [details]
Window with breeze decorations at 100%
Comment 4 Bug Janitor Service 2026-05-20 11:10:40 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/aurorae/-/merge_requests/18
Comment 5 Vlad Zahorodnii 2026-05-20 12:42:29 UTC
Git commit 4e4853bef948adf2af16fa858b58b87bd9e11455 by Vlad Zahorodnii.
Committed on 20/05/2026 at 12:39.
Pushed by vladz into branch 'master'.

v2: Fix rendering with scale factors less than 100%

It looks like FrameSvg rendering breaks with scale factors less than
100%. So, clamp the device pixel ratio for svgs to make sure that
FrameSvgs fill the decoration as expected.

M  +15   -14   v2/decoration.cpp
M  +5    -4    v2/decorationbutton.cpp
A  +24   -0    v2/util.h     [License: GPL(v2.0+)]

https://invent.kde.org/plasma/aurorae/-/commit/4e4853bef948adf2af16fa858b58b87bd9e11455
Comment 6 Vlad Zahorodnii 2026-05-20 12:49:19 UTC
Git commit dacbb89ad9fd5dd508d950afb5d438f63e39841e by Vlad Zahorodnii.
Committed on 20/05/2026 at 12:46.
Pushed by vladz into branch 'Plasma/6.7'.

v2: Fix rendering with scale factors less than 100%

It looks like FrameSvg rendering breaks with scale factors less than
100%. So, clamp the device pixel ratio for svgs to make sure that
FrameSvgs fill the decoration as expected.


(cherry picked from commit 4e4853bef948adf2af16fa858b58b87bd9e11455)

Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>

M  +15   -14   v2/decoration.cpp
M  +5    -4    v2/decorationbutton.cpp
A  +24   -0    v2/util.h     [License: GPL(v2.0+)]

https://invent.kde.org/plasma/aurorae/-/commit/dacbb89ad9fd5dd508d950afb5d438f63e39841e
Comment 7 Vlad Zahorodnii 2026-05-20 12:49:29 UTC
Git commit 4484586a4d35f4a5e7a89a3ee4465701c3e3c35e by Vlad Zahorodnii.
Committed on 20/05/2026 at 12:47.
Pushed by vladz into branch 'Plasma/6.6'.

v2: Fix rendering with scale factors less than 100%

It looks like FrameSvg rendering breaks with scale factors less than
100%. So, clamp the device pixel ratio for svgs to make sure that
FrameSvgs fill the decoration as expected.


(cherry picked from commit 4e4853bef948adf2af16fa858b58b87bd9e11455)

Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>

M  +15   -14   v2/decoration.cpp
M  +5    -4    v2/decorationbutton.cpp
A  +24   -0    v2/util.h     [License: GPL(v2.0+)]

https://invent.kde.org/plasma/aurorae/-/commit/4484586a4d35f4a5e7a89a3ee4465701c3e3c35e