Keep _NET_DESKTOP_NAMES in sync
Summary: We have to connect to nameChanged even if m_rootInfo is not set yet, otherwise names in _NET_DESKTOP_NAMES won't be kept in sync if a virtual desktop is renamed. CCBUG: 403307 Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D18503
This commit is contained in:
parent
45719a25db
commit
8fd0418187
1 changed files with 7 additions and 7 deletions
|
@ -590,14 +590,14 @@ void VirtualDesktopManager::setCount(uint count)
|
||||||
}
|
}
|
||||||
m_desktops << vd;
|
m_desktops << vd;
|
||||||
newDesktops << vd;
|
newDesktops << vd;
|
||||||
if (m_rootInfo) {
|
connect(vd, &VirtualDesktop::nameChanged, this,
|
||||||
connect(vd, &VirtualDesktop::nameChanged, this,
|
[this, vd] {
|
||||||
[this, vd]() {
|
if (m_rootInfo) {
|
||||||
if (m_rootInfo) {
|
m_rootInfo->setDesktopName(vd->x11DesktopNumber(), vd->name().toUtf8().data());
|
||||||
m_rootInfo->setDesktopName(vd->x11DesktopNumber(), vd->name().toUtf8().data());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
|
);
|
||||||
|
if (m_rootInfo) {
|
||||||
m_rootInfo->setDesktopName(vd->x11DesktopNumber(), vd->name().toUtf8().data());
|
m_rootInfo->setDesktopName(vd->x11DesktopNumber(), vd->name().toUtf8().data());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue