Bug 402853

Summary: User actions popup looks bad on HiDPI
Product: [Plasma] kwin Reporter: Vlad Zahorodnii <vlad.zahorodnii>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: kde, nate
Priority: NOR    
Version First Reported In: git master   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.15.0
Sentry Crash Report:

Description Vlad Zahorodnii 2019-01-04 13:18:43 UTC
STEPS TO REPRODUCE
1. Use 2x scaling;
2. Open the user actions popup.

OBSERVED RESULT
The popup is upscaled.

EXPECTED RESULT
The popup looks crystal clear.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.14.80
KDE Frameworks Version: 5.53
Qt Version: 5.12
Comment 1 David Edmundson 2019-01-04 14:15:27 UTC
Same for almost all kwin internal windows. 
It's simply not implemented yet.
Comment 2 David Edmundson 2019-01-14 13:59:38 UTC
Git commit 2df9d22a087f37dd48cffc53e955b8605dfeed8d by David Edmundson.
Committed on 14/01/2019 at 13:59.
Pushed by davidedmundson into branch 'master'.

Add high DPI support to internal KWin windows

Summary:
So far we didn't try to do high DPI on kwin internal windows, such as
the user context menu and tab bars and whatever.

Due to wayland scaling they were the correct phyiscal size but upscaled.
This patch fixes our QPA to enable Qt's high-dpi support.

Note icons are still low res. This is because the global
QGuiApplication::devicePixelRatio which is the max of all connected
screens is static for the duration of the app. QIcon uses this when
determining the DPR to use. This will require a Qt change.

Test Plan:
Ran at 2x on my normal DPI screen (as that's easier to see anything)
* User action menu is high DPI
* Window deco tooltips are still fine
* Tab switcher is high DPI
* Overlay in present windows Desktop grid are still ok

Reviewers: #kwin

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18042

M  +26   -0    autotests/integration/internal_window.cpp
M  +2    -2    autotests/integration/kwin_wayland_test.h
M  +1    -1    main_wayland.cpp
M  +12   -3    plugins/qpa/backingstore.cpp
M  +1    -0    plugins/qpa/backingstore.h
M  +22   -4    plugins/qpa/window.cpp
M  +4    -0    plugins/qpa/window.h
M  +1    -3    shell_client.cpp

https://commits.kde.org/kwin/2df9d22a087f37dd48cffc53e955b8605dfeed8d