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:
parent
7151b76a21
commit
49b3c4648a
@ -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);
|
||||
|
||||
|
@ -127,7 +127,7 @@ protected:
|
||||
|
||||
private slots:
|
||||
void immutabilityChanged(Plasma::Types::ImmutabilityType type);
|
||||
void updateAvailableScreenGeometry();
|
||||
void updateAvailableScreenGeometry(View *origin = nullptr);
|
||||
void updateEnabledBorders();
|
||||
void updateShowInlineProperties();
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user