1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-23 01:33:50 +03:00

fix binding loops

This commit is contained in:
Michail Vourlakos 2020-07-12 15:22:01 +03:00
parent 19eb9f9ff5
commit a0a2c4b265
2 changed files with 13 additions and 6 deletions

View File

@ -96,6 +96,10 @@ public slots:
void syncGeometry();
//! direct geometry calculations without any protections or checks
//! that might prevent them. It must be called with care.
void immediateSyncGeometry();
void initDelayedSignals();
void updateWaylandId();
@ -133,10 +137,6 @@ private slots:
void syncLatteViews();
void updateContainmentScreen();
//! direct geometry calculations without any protections or checks
//! that might prevent them. It must be called with care.
void immediateSyncGeometry();
private:
void init();
void initSignalingForLocationChangeSliding();

View File

@ -163,6 +163,11 @@ View::View(Plasma::Corona *corona, QScreen *targetScreen, bool byPassWM)
emit indicatorChanged();
}
if (m_positioner) {
//! immediateSyncGeometry helps avoiding binding loops from containment qml side
m_positioner->immediateSyncGeometry();
}
connect(this->containment(), SIGNAL(statusChanged(Plasma::Types::ItemStatus)), SLOT(statusChanged(Plasma::Types::ItemStatus)));
}, Qt::DirectConnection);
@ -324,7 +329,8 @@ void View::init(Plasma::Containment *plasma_containment)
setSource(corona()->kPackage().filePath("lattedockui"));
m_positioner->syncGeometry();
//! immediateSyncGeometry helps avoiding binding loops from containment qml side
m_positioner->immediateSyncGeometry();
qDebug() << "SOURCE:" << source();
}
@ -1353,7 +1359,8 @@ bool View::event(QEvent *e)
setupWaylandIntegration();
if (m_shellSurface) {
m_positioner->syncGeometry();
//! immediateSyncGeometry helps avoiding binding loops from containment qml side
m_positioner->immediateSyncGeometry();
m_effects->updateShadows();
}