Cleanup virutal desktops in deleted
Summary: virtual desktops can be destroyed, active clients update, but deleted keeps a cache. Someone needs to do cleanup to avoid dangly pointers. Test Plan: I couldn't find a case of someone calling desktops mid way through an animation, so it's only a hypothetical bug. Reviewers: #kwin, zzag Reviewed By: #kwin, zzag Subscribers: graesslin, zzag, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D17247icc-effect-5.17.5
parent
14b827daaa
commit
b55d276994
|
@ -141,6 +141,12 @@ void Deleted::copyToDeleted(Toplevel* c)
|
|||
m_wasGroupTransient = x11Client && x11Client->groupTransient();
|
||||
}
|
||||
|
||||
for (auto vd : m_desktops) {
|
||||
connect(vd, &QObject::destroyed, this, [=] {
|
||||
m_desktops.removeOne(vd);
|
||||
});
|
||||
}
|
||||
|
||||
m_wasWaylandClient = qobject_cast<ShellClient *>(c) != nullptr;
|
||||
m_wasX11Client = !m_wasWaylandClient;
|
||||
m_wasPopupWindow = c->isPopupWindow();
|
||||
|
|
Loading…
Reference in New Issue