SUMMARY Desktop widgets can end up below plasma panels when they are at desktops of active activities but these activities are not the current one. STEPS TO REPRODUCE 1. Add an AlwaysVisible plasma panel at top edge 2. Add a Notes widget in the current activity desktop (called [A] from now on) and push it far far at the top screen edge 3. Move to another running Activity (called [B] from now on) and do [2] again 4. While on B activity right click the panel and increase its size, you will notice that Notes applet in B activity is pushed correctly downwards at the correct position 5. Move now on A activity you will notice that Notes applet in A activity ignores totally the panel and is touching totally the screen top edge OBSERVED RESULT Notes applet in A Activity is under the plasma panel even though it should not EXPECTED RESULT Notes applet in A Activity should be at the correct position after changing the panel size ADDITIONAL INFORMATION Following the code path it is observed that Corona::availableScreenRect is FALSE for Desktop containments that are not the current one. This is happening because when Desktop Containments are calling function Plasma::ShellCorona::screenForContainment(const Plasma::Containment *containment) const they get as result screen = -1 . and screen==-1 means that availableScreenRect ignores totally the desktop margins from panels. No idea why that was decided and what is tried to be protected by the checks in the function for: containment->activity() == m_activityController->currentActivity() any ideas?
function in question: https://github.com/KDE/plasma-workspace/blob/master/shell/shellcorona.cpp#L1823
these are the commits from Marco, the main guess is that the current activity check is used in for desktop containments to not lose their screen but is this still the case for plasma >= 5.23 ? https://github.com/KDE/plasma-workspace/commit/6970bc2fb70f37f9dafb1f1af738dd23f4ecaa99#diff-abd04578a6b0d06218a589b5899c920dc6a387c7c0f9667514bb1c7cb65857f1 https://github.com/KDE/plasma-workspace/commit/8e0068c64c192df23d5fe024e03896a951f55804#diff-abd04578a6b0d06218a589b5899c920dc6a387c7c0f9667514bb1c7cb65857f1 https://github.com/KDE/plasma-workspace/commit/2b9088606cd7db670b20b0bf56574788f8dbdc2b#diff-abd04578a6b0d06218a589b5899c920dc6a387c7c0f9667514bb1c7cb65857f1
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/plasma-framework/-/merge_requests/390
Git commit c3bccdf278f2d9cbf638e864fc478cb72d2d0db5 by Nate Graham, on behalf of Michail Vourlakos. Committed on 13/12/2021 at 15:58. Pushed by ngraham into branch 'master'. fix availableScreenRect for applets/containments --when an applet or desktop containment is not in the current activity and requests ::availableScreenRect() value, Plasma::Corona decides to return as valid screenId: -1. That behavior can lead to applets going under plasma panels that have set visibility to AlwaysVisible. Such panels should always been taken into account when calculating the available screen geometry. M +5 -0 src/scriptengines/qml/plasmoid/appletinterface.cpp https://invent.kde.org/frameworks/plasma-framework/commit/c3bccdf278f2d9cbf638e864fc478cb72d2d0db5