[wayland,crash]-fix showing advanced dock settings

--fix showing advanced settings window in order to update
the window geometry ONLY WHEN there are availableScreenGeometry
changes from Latte::View(s).
--As a side effect changing docks/panels location under wayland
when they have enabled their background blur has reduced crashes
during location changes.
pull/11/head
Michail Vourlakos 5 years ago
parent 706a80cae3
commit 411017c0f6

@ -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);

@ -127,7 +127,7 @@ protected:
private slots:
void immutabilityChanged(Plasma::Types::ImmutabilityType type);
void updateAvailableScreenGeometry();
void updateAvailableScreenGeometry(View *origin = nullptr);
void updateEnabledBorders();
void updateShowInlineProperties();

@ -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);

@ -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);

Loading…
Cancel
Save