SUMMARY A floating panel doesn't unfloat before a newly placed window touches it, which creates an unnecessary offset for the window position once the panel then unfloats. STEPS TO REPRODUCE 1. Set panel to top positioned and floating 2. Set window placement to top-left corner 3. Have no visible windows currently touching the panel so it is floating 4. Open a new window OBSERVED RESULT New window gets placed with a margin to the floating panel, then the panel unfloats to get out of the way of the now touching window, now there is a gap between the window and the panel EXPECTED RESULT New window touches the unfloated panel SOFTWARE/OS VERSIONS git master
May I ask you for a screenshot / vid of the situation? Thanks!
Created attachment 168605 [details] Window gets placed with margin You can see in the video how the first window ends up with a margin to the defloated panel, while the second window gets placed correctly (here in "minimal overlapping" window placement mode to illustrate better).
I might as well have filed the issue against KWin as a bug of the placement code; the problem is the interaction between the two: By the time the window is placed, the panel doesn't yet know to defloat, so the placement respects the floating margin, which directly afterwards goes away. Not sure how this could be fixed.
The fix is that Kwin should use the reserved space by layer shells to position newly created windows instead of relying on their size; the reserved space is always of the correct size
Git commit f7ee03d065b4e293746248f749a7965c4321b1cb by Marco Martin. Committed on 05/07/2024 at 12:16. Pushed by mart into branch 'master'. Refactor floating panels * Floating panels are always big enough to fit the floating version * they never move during animations * when they unfloat the masks get updated so that the extra area is completely hidden * the exclusive zone never changes and follows the unfloated geometry * maximize window animations are better, won't resize the window twice anymore * unfloating animation is smoother now depends from https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2309, https://invent.kde.org/frameworks/ksvg/-/merge_requests/50, https://invent.kde.org/plasma/libplasma/-/merge_requests/1166 and https://invent.kde.org/plasma/libplasma/-/merge_requests/1148 Related: bug 483346, bug 480550 M +1 -0 shell/autotests/CMakeLists.txt M +19 -9 shell/panelshadows.cpp M +2 -1 shell/panelshadows_p.h M +81 -45 shell/panelview.cpp M +0 -1 shell/panelview.h https://invent.kde.org/plasma/plasma-workspace/-/commit/f7ee03d065b4e293746248f749a7965c4321b1cb
On X11 the bug is still present for me.