From fa643132bcf65293b1f382c12f0ea4f9f2b18256 Mon Sep 17 00:00:00 2001 From: Martin Klapetek Date: Fri, 7 Mar 2014 17:18:32 +0100 Subject: [PATCH] Use QScreen::virtualGeometry() for computing panel struts QScreen::availableGeometry() returns screen size minus the struts, which is fine on first Plasma start. But if Plasma crashes, the struts set on the startup are not cleared and then when Plasma autorestarts, availableGeometry() gives it rect with the old struts to which Plasma adds one more panel height (so the total strut height is panel.height()*(numberOfCrashes+1)). Using QScreen::virtualGeometry() gives us the whole screen including struts and the new struts are computed and set properly. Reviewed-by: Marco Martin --- src/shell/panelview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shell/panelview.cpp b/src/shell/panelview.cpp index 2158dc6a5..c96bb6782 100644 --- a/src/shell/panelview.cpp +++ b/src/shell/panelview.cpp @@ -644,7 +644,7 @@ void PanelView::updateStruts() if (m_visibilityMode == NormalPanel) { const QRect thisScreen = corona()->screenGeometry(containment()->screen()); - const QRect wholeScreen = screen()->availableGeometry(); + const QRect wholeScreen = screen()->virtualGeometry(); //Extended struts against a screen edge near to another screen are really harmful, so windows maximized under the panel is a lesser pain //TODO: force "windows can cover" in those cases?