diff --git a/app/view/settings/primaryconfigview.cpp b/app/view/settings/primaryconfigview.cpp index b6405f581..9b3ea42fe 100644 --- a/app/view/settings/primaryconfigview.cpp +++ b/app/view/settings/primaryconfigview.cpp @@ -110,10 +110,9 @@ PrimaryConfigView::PrimaryConfigView(Plasma::Containment *containment, Latte::Vi m_thicknessSyncTimer.start(); }); - connections << connect(m_latteView, &Latte::View::availableScreenRectChangedForViewParts, this, &PrimaryConfigView::updateAvailableScreenGeometry); - if (m_corona) { connections << connect(m_corona, &Latte::Corona::raiseViewsTemporaryChanged, this, &PrimaryConfigView::raiseDocksTemporaryChanged); + connections << connect(m_corona, &Latte::Corona::availableScreenRectChangedFrom, this, &PrimaryConfigView::updateAvailableScreenGeometry); } if (m_latteView->layout()) { @@ -213,8 +212,8 @@ void PrimaryConfigView::deleteSecondaryWindow() } } -void PrimaryConfigView::updateAvailableScreenGeometry() -{ +void PrimaryConfigView::updateAvailableScreenGeometry(View *origin) +{ int currentScrId = m_latteView->positioner()->currentScreenId(); m_availableScreenGeometry = m_corona->availableScreenRectWithCriteria(currentScrId, QString(), {}, {}, true); diff --git a/app/view/settings/primaryconfigview.h b/app/view/settings/primaryconfigview.h index bca345c63..67ea3bcb6 100644 --- a/app/view/settings/primaryconfigview.h +++ b/app/view/settings/primaryconfigview.h @@ -127,7 +127,7 @@ protected: private slots: void immutabilityChanged(Plasma::Types::ImmutabilityType type); - void updateAvailableScreenGeometry(); + void updateAvailableScreenGeometry(View *origin = nullptr); void updateEnabledBorders(); void updateShowInlineProperties(); diff --git a/app/view/view.cpp b/app/view/view.cpp index 8bbeac51e..c0d344dcf 100644 --- a/app/view/view.cpp +++ b/app/view/view.cpp @@ -233,7 +233,6 @@ void View::init() connect(this, &View::availableScreenRectChangedFrom, m_corona, &Latte::Corona::availableScreenRectChangedFrom); connect(this, &View::availableScreenRegionChangedFrom, m_corona, &Latte::Corona::availableScreenRegionChangedFrom); connect(m_corona, &Latte::Corona::availableScreenRectChangedFrom, this, &View::availableScreenRectChangedFromSlot); - connect(m_corona, &Latte::Corona::availableScreenRectChanged, this, &View::availableScreenRectChangedForViewParts); connect(this, &View::byPassWMChanged, this, &View::saveConfig); connect(this, &View::isPreferredForShortcutsChanged, this, &View::saveConfig); @@ -307,7 +306,6 @@ void View::disconnectSensitiveSignals() disconnect(this, &View::availableScreenRectChangedFrom, m_corona, &Latte::Corona::availableScreenRectChangedFrom); disconnect(this, &View::availableScreenRegionChangedFrom, m_corona, &Latte::Corona::availableScreenRegionChangedFrom); disconnect(m_corona, &Latte::Corona::availableScreenRectChangedFrom, this, &View::availableScreenRectChangedFromSlot); - disconnect(m_corona, &Latte::Corona::availableScreenRectChanged, this, &View::availableScreenRectChangedForViewParts); setLayout(nullptr); diff --git a/app/view/view.h b/app/view/view.h index af55740d1..507431ae0 100644 --- a/app/view/view.h +++ b/app/view/view.h @@ -298,8 +298,6 @@ signals: void absoluteGeometryChanged(const QRect &geometry); - //! pass on signals to children in order to avoid crashes when View is recreated or destroyed - void availableScreenRectChangedForViewParts(); void indicatorPluginChanged(const QString &indicatorId); void indicatorPluginRemoved(const QString &indicatorId);