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
This commit is contained in:
parent
924fd195ae
commit
fa643132bc
@ -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?
|
||||
|
Loading…
Reference in New Issue
Block a user