Commit b55d2769 authored by David Edmundson's avatar David Edmundson

Cleanup virutal desktops in deleted

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:
parent 14b827da
......@@ -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_wasWaylandClient = qobject_cast<ShellClient *>(c) != nullptr;
m_wasX11Client = !m_wasWaylandClient;
m_wasPopupWindow = c->isPopupWindow();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment