[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kwin] /: Also finishCompositing for Wayland windows in Compositor::finish
From:       Martin_Gräßlin <mgraesslin () kde ! org>
Date:       2016-08-19 7:18:59
Message-ID: E1bae4x-0001lP-QV () code ! kde ! org
[Download RAW message or body]

Git commit facca93606e326e645b45f6691cf2172c51a533c by Martin Gräßlin.
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(), 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();
 }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic