mirror of
https://github.com/KDE/latte-dock.git
synced 2025-02-01 01:47:23 +03:00
fix #285,expanded to false for applets
--when changing session all the applets from the previous session should hide their expanded options
This commit is contained in:
parent
c0fb3e7ede
commit
610e0d6a74
@ -511,6 +511,7 @@ void DockCorona::syncDockViews()
|
||||
if (view->session() != currentSession()) {
|
||||
qDebug() << "deleting view that does not belong in this session...";
|
||||
auto viewToDelete = m_dockViews.take(view->containment());
|
||||
viewToDelete->deactivateApplets();
|
||||
viewToDelete->deleteLater();
|
||||
//! which explicit docks can be deleted
|
||||
} else if (!found && !view->onPrimary() && (m_dockViews.size() > 1) && m_dockViews.contains(view->containment())
|
||||
|
@ -1066,6 +1066,21 @@ void DockView::closeApplication()
|
||||
dockCorona->closeApplication();
|
||||
}
|
||||
|
||||
void DockView::deactivateApplets()
|
||||
{
|
||||
if (!containment()) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (auto applet, containment()->applets()) {
|
||||
PlasmaQuick::AppletQuickItem *ai = applet->property("_plasma_graphicObject").value<PlasmaQuick::AppletQuickItem *>();
|
||||
|
||||
if (ai) {
|
||||
ai->setExpanded(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QVariantList DockView::containmentActions()
|
||||
{
|
||||
QVariantList actions;
|
||||
|
@ -139,6 +139,8 @@ public:
|
||||
|
||||
VisibilityManager *visibility() const;
|
||||
|
||||
void deactivateApplets();
|
||||
|
||||
QQmlListProperty<QScreen> screens();
|
||||
static int countScreens(QQmlListProperty<QScreen> *property);
|
||||
static QScreen *atScreens(QQmlListProperty<QScreen> *property, int index);
|
||||
|
Loading…
x
Reference in New Issue
Block a user