mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-30 14:50:12 +03:00
crash fix:from unloading views
--when as Always Visible view was unloaded from a CentralLayout because its Activity was closing it was creating a crash. This patch fixes the situation by releasing sensitive view signals earlier.
This commit is contained in:
parent
df5c2a2be3
commit
9b6f597ce6
@ -72,6 +72,14 @@ void GenericLayout::unloadContainments()
|
||||
<< " ,latteViews in memory ::: " << m_latteViews.size()
|
||||
<< " ,hidden latteViews in memory ::: " << m_waitingLatteViews.size();
|
||||
|
||||
for (const auto view : m_latteViews) {
|
||||
view->disconnectSensitiveSignals();
|
||||
}
|
||||
|
||||
for (const auto view : m_waitingLatteViews) {
|
||||
view->disconnectSensitiveSignals();
|
||||
}
|
||||
|
||||
m_unloadedContainmentsIds.clear();
|
||||
|
||||
QList<Plasma::Containment *> systrays;
|
||||
|
@ -231,6 +231,8 @@ void View::init()
|
||||
connect(this, &QQuickWindow::heightChanged, this, &View::updateAbsoluteGeometry);
|
||||
|
||||
connect(m_corona, &Latte::Corona::availableScreenRectChangedFrom, this, &View::availableScreenRectChangedFrom);
|
||||
//! used in order to disconnect it when it should NOT be called because it creates crashes
|
||||
connect(this, &View::availableScreenRegionChangedFrom, m_corona, &Latte::Corona::availableScreenRegionChangedFrom);
|
||||
|
||||
connect(this, &View::byPassWMChanged, this, &View::saveConfig);
|
||||
connect(this, &View::isPreferredForShortcutsChanged, this, &View::saveConfig);
|
||||
@ -294,6 +296,7 @@ bool View::inDelete() const
|
||||
void View::disconnectSensitiveSignals()
|
||||
{
|
||||
disconnect(m_corona, &Latte::Corona::availableScreenRectChangedFrom, this, &View::availableScreenRectChangedFrom);
|
||||
disconnect(this, &View::availableScreenRegionChangedFrom, m_corona, &Latte::Corona::availableScreenRegionChangedFrom);
|
||||
setLayout(nullptr);
|
||||
|
||||
if (m_windowsTracker) {
|
||||
@ -481,7 +484,7 @@ void View::updateAbsoluteGeometry(bool bypassChecks)
|
||||
if (visibility() && corona() && visibility()->mode() == Types::AlwaysVisible) {
|
||||
//! main use of BYPASSCKECKS is from Positioner when the view changes screens
|
||||
emit m_corona->availableScreenRectChangedFrom(this);
|
||||
emit m_corona->availableScreenRegionChangedFrom(this);
|
||||
emit availableScreenRegionChangedFrom(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -291,6 +291,8 @@ signals:
|
||||
void availableScreenRectChangedForViewParts();
|
||||
void customPluginsChanged();
|
||||
|
||||
void availableScreenRegionChangedFrom(Latte::View *origin);
|
||||
|
||||
private slots:
|
||||
void availableScreenRectChangedFrom(View *origin);
|
||||
void configViewCreatedFor(Latte::View *view);
|
||||
|
Loading…
x
Reference in New Issue
Block a user