From 1bfba1765cbaf27e451e921e7e55f39931df0137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 13 Mar 2015 11:48:08 +0100 Subject: [PATCH] Signal desktopPresenceChanged carries AbstractClient as argument --- abstract_client.h | 1 + client.h | 1 - effects.cpp | 2 +- scripting/workspace_wrapper.cpp | 2 +- scripting/workspace_wrapper.h | 2 +- workspace.cpp | 2 +- workspace.h | 2 +- 7 files changed, 6 insertions(+), 6 deletions(-) diff --git a/abstract_client.h b/abstract_client.h index cf24a63d49..2f70061364 100644 --- a/abstract_client.h +++ b/abstract_client.h @@ -247,6 +247,7 @@ Q_SIGNALS: * Emitted whenever the demands attention state changes. **/ void demandsAttentionChanged(); + void desktopPresenceChanged(KWin::AbstractClient*, int); // to be forwarded by Workspace protected: AbstractClient(); diff --git a/client.h b/client.h index 19b2508f2e..fc637ed77c 100644 --- a/client.h +++ b/client.h @@ -636,7 +636,6 @@ Q_SIGNALS: void clientFinishUserMovedResized(KWin::Client*); void captionChanged(); void desktopChanged(); - void desktopPresenceChanged(KWin::Client*, int); // to be forwarded by Workspace void fullScreenChanged(); void transientChanged(); void modalChanged(); diff --git a/effects.cpp b/effects.cpp index e939a8b12b..6bf4642c57 100644 --- a/effects.cpp +++ b/effects.cpp @@ -231,7 +231,7 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene) } ); connect(ws, &Workspace::desktopPresenceChanged, this, - [this](Client *c, int old) { + [this](AbstractClient *c, int old) { if (!c->effectWindow()) { return; } diff --git a/scripting/workspace_wrapper.cpp b/scripting/workspace_wrapper.cpp index f041dcc294..5c94e4a045 100644 --- a/scripting/workspace_wrapper.cpp +++ b/scripting/workspace_wrapper.cpp @@ -38,7 +38,7 @@ WorkspaceWrapper::WorkspaceWrapper(QObject* parent) : QObject(parent) { KWin::Workspace *ws = KWin::Workspace::self(); KWin::VirtualDesktopManager *vds = KWin::VirtualDesktopManager::self(); - connect(ws, SIGNAL(desktopPresenceChanged(KWin::Client*,int)), SIGNAL(desktopPresenceChanged(KWin::Client*,int))); + connect(ws, &Workspace::desktopPresenceChanged, this, &WorkspaceWrapper::desktopPresenceChanged); connect(ws, &Workspace::currentDesktopChanged, this, &WorkspaceWrapper::currentDesktopChanged); connect(ws, SIGNAL(clientAdded(KWin::Client*)), SIGNAL(clientAdded(KWin::Client*))); connect(ws, SIGNAL(clientAdded(KWin::Client*)), SLOT(setupClientConnections(KWin::Client*))); diff --git a/scripting/workspace_wrapper.h b/scripting/workspace_wrapper.h index 327866ac6d..9761ec423f 100644 --- a/scripting/workspace_wrapper.h +++ b/scripting/workspace_wrapper.h @@ -88,7 +88,7 @@ private: Q_DISABLE_COPY(WorkspaceWrapper) Q_SIGNALS: - void desktopPresenceChanged(KWin::Client *client, int desktop); + void desktopPresenceChanged(KWin::AbstractClient *client, int desktop); void currentDesktopChanged(int desktop, KWin::AbstractClient *client); void clientAdded(KWin::Client *client); void clientRemoved(KWin::Client *client); diff --git a/workspace.cpp b/workspace.cpp index ab22dcc245..d589bd075e 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -464,7 +464,7 @@ Client* Workspace::createClient(xcb_window_t w, bool is_mapped) connect(c, SIGNAL(geometryShapeChanged(KWin::Toplevel*,QRect)), m_compositor, SLOT(checkUnredirect())); connect(c, SIGNAL(blockingCompositingChanged(KWin::Client*)), m_compositor, SLOT(updateCompositeBlocking(KWin::Client*))); connect(c, SIGNAL(clientFullScreenSet(KWin::Client*,bool,bool)), ScreenEdges::self(), SIGNAL(checkBlocking())); - connect(c, SIGNAL(desktopPresenceChanged(KWin::Client*,int)), SIGNAL(desktopPresenceChanged(KWin::Client*,int)), Qt::QueuedConnection); + connect(c, &Client::desktopPresenceChanged, this, &Workspace::desktopPresenceChanged, Qt::QueuedConnection); if (!c->manage(w, is_mapped)) { Client::deleteClient(c); return NULL; diff --git a/workspace.h b/workspace.h index 3a36c97a2c..067b5e4c68 100644 --- a/workspace.h +++ b/workspace.h @@ -441,7 +441,7 @@ Q_SIGNALS: void workspaceInitialized(); //Signals required for the scripting interface - void desktopPresenceChanged(KWin::Client*, int); + void desktopPresenceChanged(KWin::AbstractClient*, int); void currentDesktopChanged(int, KWin::AbstractClient*); void clientAdded(KWin::Client*); void clientRemoved(KWin::Client*);