Also finishCompositing for Wayland windows in Compositor::finish

We should be able to restart the Compositor also on Wayland.

As the Compositor might be terminated after Workspace we need to
ensure to not call into Workspace while doing finishCompositing.

Reviewed-By: bshah
This commit is contained in:
Martin Gräßlin 2016-08-18 11:51:54 +02:00
parent 2ab8a7b80a
commit facca93606

View file

@ -370,6 +370,20 @@ void Compositor::finish()
c->finishCompositing();
xcb_composite_unredirect_subwindows(connection(), rootWindow(), XCB_COMPOSITE_REDIRECT_MANUAL);
}
if (waylandServer()) {
foreach (ShellClient *c, waylandServer()->clients()) {
m_scene->windowClosed(c, nullptr);
}
foreach (ShellClient *c, waylandServer()->internalClients()) {
m_scene->windowClosed(c, nullptr);
}
foreach (ShellClient *c, waylandServer()->clients()) {
c->finishCompositing();
}
foreach (ShellClient *c, waylandServer()->internalClients()) {
c->finishCompositing();
}
}
delete effects;
effects = NULL;
delete m_scene;
@ -971,6 +985,9 @@ void Toplevel::damageNotifyEvent()
bool Toplevel::compositing() const
{
if (!Workspace::self()) {
return false;
}
return Workspace::self()->compositing();
}