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:
parent
19eb9f9ff5
commit
a0a2c4b265
@ -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();
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user