Emit Workspace::deletedRemoved for every Deleted still around when terminating Workspace

For the exit-with-session option in kwin_wayland there is a chance that
the window which triggered termination is currently a Deleted. The
Wayland shutdown sequence terminates Workspace before the Compositor
which results in that Deleted's Scene::Window surviving the shutdown
process and thus the Shadow not being removed from the cache. This
makes KWin assert very late in the shutdown process when the decoration
shadow cache gets destroyed.
icc-effect-5.14.5
Martin Gräßlin 2016-08-18 11:44:48 +02:00
parent d03a50c6e1
commit 2ab8a7b80a
1 changed files with 5 additions and 0 deletions

View File

@ -470,6 +470,11 @@ Workspace::~Workspace()
(*it)->release(ReleaseReason::KWinShutsDown);
xcb_delete_property(connection(), rootWindow(), atoms->kwin_running);
for (auto it = deleted.begin(); it != deleted.end();) {
emit deletedRemoved(*it);
it = deleted.erase(it);
}
delete RuleBook::self();
kwinApp()->config()->sync();