update only when needed PrimaryCV availScreenGeom

pull/19/head
Michail Vourlakos 5 years ago
parent 6a4aeb16f0
commit d30143f7f1

@ -244,6 +244,14 @@ void PrimaryConfigView::initParentView(Latte::View *view)
SubConfigView::initParentView(view);
viewconnections << connect(m_latteView, &Latte::View::locationChanged, this, [this]() {
updateAvailableScreenGeometry();
});
viewconnections << connect(m_latteView->positioner(), &Latte::ViewPart::Positioner::currentScreenChanged, this, [this]() {
updateAvailableScreenGeometry();
});
viewconnections << connect(this, &PrimaryConfigView::inAdvancedModeChanged, m_latteView, &Latte::View::inSettingsAdvancedModeChanged);
viewconnections << connect(m_latteView->containment(), &Plasma::Containment::immutabilityChanged, this, &PrimaryConfigView::immutabilityChanged);
@ -272,7 +280,7 @@ void PrimaryConfigView::initParentView(Latte::View *view)
void PrimaryConfigView::updateAvailableScreenGeometry(View *origin)
{
if (!m_latteView) {
if (!m_latteView || m_latteView == origin) {
return;
}

Loading…
Cancel
Save