Skip to content

[shell] Update struts on screen size change

Andrew Chen requested to merge andrewc/plasma-workspace:struts into master

Panel struts may need to be updated when screen configuration changes, even when the panel isn't resized or moved. Example: screen below the panel is removed.

Currently the struts are only sometimes updated, that is when ShellCorona::reconsiderOutputs is called. This is timing dependant since ShellCorona::addOutput connects QScreen::geometryChange to it, and geometryChagned signal can arrive before addOutput is called, in which case the struts aren't updated.

I am not sure if this behaviour is intended, but it's best to not rely on it. Instead lets just update the struts when screen size changes like we used to.

There was a previous commit d66d6d57 that is similar, however it got lost when the dependency on KScreen was removed.

Since now we rely on QScreen, we need to connect the QScreen signal every time it changes, hence the change being in setScreenToFollow.

Merge request reports

Loading