1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-03-28 18:50:40 +03:00

[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.
This commit is contained in:
Michail Vourlakos 2020-01-10 16:47:57 +02:00
parent 7151b76a21
commit 49b3c4648a
4 changed files with 4 additions and 9 deletions

View File

@ -116,10 +116,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()) {
@ -219,8 +218,8 @@ void PrimaryConfigView::deleteSecondaryWindow()
}
}
void PrimaryConfigView::updateAvailableScreenGeometry()
{
void PrimaryConfigView::updateAvailableScreenGeometry(View *origin)
{
int currentScrId = m_latteView->positioner()->currentScreenId();
m_availableScreenGeometry = m_corona->availableScreenRectWithCriteria(currentScrId, {}, {}, true);

View File

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

View File

@ -234,7 +234,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);
@ -299,7 +298,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);

View File

@ -287,8 +287,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 customPluginsChanged();
//! are used to trigger the Corona relevant signals and in that