SUMMARY When using PLASMA_USE_QT_SCALING=1 on X11 (as it's the only way to get correct paddings and UI sizing in Plasma under X11 on a hidpi screen) and minimizing window with a KWin effect, Plasma reports unscaled iconGeometry (in logical coordinates instead of real pixels that KWin expects, like 200x850 instead of 400x1700 on 2x screen), resulting in wrong animations. STEPS TO REPRODUCE 1. Use Plasma on a hidpi screen with PLASMA_USE_QT_SCALING=1 enabled 2. Try to minimize a window by clicking on the taskbar icon (with some minimization animation enabled in KWin) OBSERVED RESULT The window gets minimized to some place in the middle of the screen. EXPECTED RESULT The window gets minimized to the clicked taskbar icon. SOFTWARE/OS VERSIONS KDE Plasma Version: 5.15.5 KDE Frameworks Version: 5.57 Qt Version: 5.12.3 ADDITIONAL INFORMATION https://phabricator.kde.org/T8177#176789
This is precisely why plasmashell doesn't use Qt scaling! You mix two geometry spaces. X doesn't have a standardised logical pixel size. If you have two processes (kwin and plasma) speaking to each other in different geometry spaces you have tonnes of these bugs. Don't set random envs.
I don't set random envs, I know what I'm getting into. Not using Qt scaling in Plasma leads to an aesthetic disaster with hidpi scaling. The alternative is a minor glitch reported here. Finding the cases where geometry spaces are being mixed up and fixing them seems to be a correct way to go, as I was advised in T8177.
*** Bug 394812 has been marked as a duplicate of this bug. ***
Working on this.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/96
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kwindowsystem/-/merge_requests/2
Git commit b7057a38e142f6ec673526026352cb061e9d2731 by Nate Graham. Committed on 02/07/2020 at 16:21. Pushed by ngraham into branch 'master'. [xcb] Send correctly scaled icon geometry Otherwise when using Qt scaling on X11, icon information has the wrong size and location on screen, with the user-visible effect that window Minimize animations minimize the window to the wrong location when using Qt scaling on X11 with a high DPI screen. The effect is especially hilarious with the Magic Lamp minimize effect and a bottom panel. This change fixes all of that so that the minimize animations work properly on X11 with Qt scaling and a high DPI screen. FIXED-IN: 5.72 M +6 -4 src/platforms/xcb/netwm.cpp https://invent.kde.org/frameworks/kwindowsystem/commit/b7057a38e142f6ec673526026352cb061e9d2731