Bug 452730

Summary: Shadows around Aurorae-decorated windows are not rendered proportionally (Scale-Factor 200%+, wayland, qt)
Product: [Plasma] kwin Reporter: gonanza <gonanza>
Component: auroraeAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: farline99, nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian unstable   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=465790
Latest Commit: Version Fixed In: 5.27.2
Attachments: Screenshot

Description gonanza 2022-04-18 12:12:58 UTC
Since changing the scale-Factor of the DE, all windows shadows are rendered false (seem to be not scaled also, wayland)
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. open wayland-session
2. change Scale-Factor to 200 % (on UHD-displays 3840x2160+)
3. observe window-shadows (qt): are only rendered half the way (scale-factor seems not to be used proportionally), beginning in the upper left section of each window, then stopping in the middle of each window.

OBSERVED RESULT


EXPECTED RESULT


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

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2022-04-18 15:16:06 UTC
You're on X11, right? This is due to KWin not being hidpi-aware on X11. It's working properly on Wayland.
Comment 2 Nate Graham 2022-04-18 15:16:26 UTC
Oh, I completely missed the fact that you said you're already on Wayland, sorry. Must be a bug then.
Comment 3 farline99 2023-02-17 11:19:52 UTC
Created attachment 156360 [details]
Screenshot
Comment 4 farline99 2023-02-17 11:21:04 UTC
Issue is still here. Screenshot above. Arch Linux, plasma 5.27, frameworks 103, Wayland, HiDPI 200%.
Comment 5 Nate Graham 2023-02-17 19:33:08 UTC
Can reproduce.
Comment 6 Bug Janitor Service 2023-02-20 16:23:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3641
Comment 7 David Edmundson 2023-02-21 11:52:32 UTC
Git commit 01fd54d7538a1b8a9c954645142af699284d01d5 by David Edmundson.
Committed on 21/02/2023 at 11:07.
Pushed by davidedmundson into branch 'master'.

Aurorae: Add dummy window for working device pixel ratio

Aurorae uses a QQuickWindow that receives an implicit scale through the
QPA. Unfortunately there's a known quirk with device pixel ratio not
being followed when offscreen surfaces are never shown and an
independent render control is used.

Without this QQuickRenderControl::grab ends up using a buffer the size
of the window * dpr, but with the contents rendered at 1x in the corner
along with incorrect device pixel ratio information.

This patch copies a used solution from EffectQuickView. This can be
resolved more neatly with newer Qt.
Related: bug 465790

M  +13   -1    src/plugins/kdecorations/aurorae/src/aurorae.cpp
M  +1    -0    src/plugins/kdecorations/aurorae/src/aurorae.h

https://invent.kde.org/plasma/kwin/commit/01fd54d7538a1b8a9c954645142af699284d01d5
Comment 8 Vlad Zahorodnii 2023-02-21 12:22:16 UTC
Git commit 5e16c3337e266adcccce00cf698c679d5012fb48 by Vlad Zahorodnii, on behalf of David Edmundson.
Committed on 21/02/2023 at 11:55.
Pushed by vladz into branch 'Plasma/5.27'.

Aurorae: Add dummy window for working device pixel ratio

Aurorae uses a QQuickWindow that receives an implicit scale through the
QPA. Unfortunately there's a known quirk with device pixel ratio not
being followed when offscreen surfaces are never shown and an
independent render control is used.

Without this QQuickRenderControl::grab ends up using a buffer the size
of the window * dpr, but with the contents rendered at 1x in the corner
along with incorrect device pixel ratio information.

This patch copies a used solution from EffectQuickView. This can be
resolved more neatly with newer Qt.
Related: bug 465790


(cherry picked from commit 01fd54d7538a1b8a9c954645142af699284d01d5)

M  +13   -1    src/plugins/kdecorations/aurorae/src/aurorae.cpp
M  +1    -0    src/plugins/kdecorations/aurorae/src/aurorae.h

https://invent.kde.org/plasma/kwin/commit/5e16c3337e266adcccce00cf698c679d5012fb48
Comment 9 farline99 2023-03-02 09:50:35 UTC
It is fixed. Thank you, KDE ❤️❤️😍😍