Skip to content
  • Andrew Chen's avatar
    [shell] Update struts on screen size change · 1623b9ef
    Andrew Chen authored
    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.
    1623b9ef