Connect the lost CM Ownership directly to finish slot

All the custom slot did was printing a debug statement and
calling finish. We do not need this debug statement. The times
of Compositors not part of Window Managers are over, so it is
extremely unlikely that we lose the ownership without KWin
going down anyway.
This commit is contained in:
Martin Gräßlin 2012-08-17 08:19:38 +02:00
parent 28a5487d4d
commit df6c423962
2 changed files with 3 additions and 9 deletions

View file

@ -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) {

View file

@ -24,7 +24,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QtCore/QObject>
#include <QtCore/QTimer>
#include <QRegion>
#include <kmanagerselection.h>
class KSelectionOwner;
namespace KWin {
@ -122,7 +123,6 @@ private Q_SLOTS:
**/
void restart();
void fallbackToXRenderCompositing();
void lostCMSelection();
void performCompositing();
void performMousePoll();
void delayedCheckUnredirect();