From kde-commits Fri Aug 19 07:18:59 2016 From: =?utf-8?q?Martin_Gr=C3=A4=C3=9Flin?= Date: Fri, 19 Aug 2016 07:18:59 +0000 To: kde-commits Subject: [kwin] /: Also finishCompositing for Wayland windows in Compositor::finish Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=147159115020724 Git commit facca93606e326e645b45f6691cf2172c51a533c by Martin Gr=C3=A4=C3= =9Flin. Committed on 19/08/2016 at 07:18. Pushed by graesslin into branch 'master'. 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 M +17 -0 composite.cpp http://commits.kde.org/kwin/facca93606e326e645b45f6691cf2172c51a533c diff --git a/composite.cpp b/composite.cpp index 3a40b00..cb77dab 100644 --- a/composite.cpp +++ b/composite.cpp @@ -370,6 +370,20 @@ void Compositor::finish() c->finishCompositing(); xcb_composite_unredirect_subwindows(connection(), rootWindow(), XC= B_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 =3D NULL; delete m_scene; @@ -971,6 +985,9 @@ void Toplevel::damageNotifyEvent() = bool Toplevel::compositing() const { + if (!Workspace::self()) { + return false; + } return Workspace::self()->compositing(); } =20