diff --git a/composite.cpp b/composite.cpp
index 83218b9277..e5e345503e 100644
--- a/composite.cpp
+++ b/composite.cpp
@@ -147,7 +147,7 @@ void Compositor::slotCompositingOptionsInitialized()
char selection_name[ 100 ];
sprintf(selection_name, "_NET_WM_CM_S%d", DefaultScreen(display()));
cm_selection = new KSelectionOwner(selection_name);
- connect(cm_selection, SIGNAL(lostOwnership()), SLOT(lostCMSelection()));
+ connect(cm_selection, SIGNAL(lostOwnership()), SLOT(finish()));
cm_selection->claim(true); // force claiming
switch(options->compositingMode()) {
@@ -297,12 +297,6 @@ void Compositor::fallbackToXRenderCompositing()
}
}
-void Compositor::lostCMSelection()
-{
- kDebug(1212) << "Lost compositing manager selection";
- finishCompositing();
-}
-
void Compositor::slotConfigChanged()
{
if (!m_suspended) {
diff --git a/composite.h b/composite.h
index f899436a56..292fef33bf 100644
--- a/composite.h
+++ b/composite.h
@@ -24,7 +24,8 @@ along with this program. If not, see .
#include
#include
#include
-#include
+
+class KSelectionOwner;
namespace KWin {
@@ -122,7 +123,6 @@ private Q_SLOTS:
**/
void restart();
void fallbackToXRenderCompositing();
- void lostCMSelection();
void performCompositing();
void performMousePoll();
void delayedCheckUnredirect();