Remove tiling dependency from activation.cpp

Instead of directly calling notifyTilingWindowActivated() the signal
clientActivated() is used and connected. Including tiling.h is no longer
needed in activation.cpp.
This commit is contained in:
Arthur Arlt 2011-07-19 12:38:49 +02:00
parent 85c5439b5d
commit 0c5da9f96f
3 changed files with 4 additions and 6 deletions

View file

@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "group.h"
#include "rules.h"
#include <QX11Info>
#include "tiling/tiling.h"
namespace KWin
{
@ -263,9 +262,6 @@ void Workspace::setActiveClient(Client* c, allowed_t)
if (active_client) {
active_client->sl_activated();
}
if (m_tiling->tilingEnabled())
m_tiling->notifyTilingWindowActivated(active_client);
--set_active_client_recursion;
}

View file

@ -96,6 +96,7 @@ void Tiling::setTilingEnabled(bool tiling)
connect(m_workspace, SIGNAL(clientAdded(KWin::Client*)), this, SLOT(slotResizeTilingLayouts()));
connect(m_workspace, SIGNAL(numberDesktopsChanged(int)), this, SLOT(slotResizeTilingLayouts()));
connect(m_workspace, SIGNAL(clientRemoved(KWin::Client*)), this, SLOT(removeTile(KWin::Client*)));
connect(m_workspace, SIGNAL(clientActivated(KWin::Client*)), this, SLOT(notifyTilingWindowActivated(KWin::Client*)));
tilingLayouts.resize(Workspace::self()->numberOfDesktops() + 1);
foreach (Client * c, Workspace::self()->stackingOrder()) {
createTile(c);
@ -265,7 +266,7 @@ void Tiling::notifyTilingWindowDesktopChanged(Client *c, int old_desktop)
/*
* Implements the 3 raising modes in Window Behaviour -> Advanced
*/
void Tiling::notifyTilingWindowActivated(Client *c)
void Tiling::notifyTilingWindowActivated(KWin::Client *c)
{
if (c == NULL)
return;

View file

@ -53,7 +53,6 @@ public:
void notifyTilingWindowResizeDone(Client *c, const QRect &moveResizeGeom, const QRect &orig, bool canceled);
void notifyTilingWindowMoveDone(Client *c, const QRect &moveResizeGeom, const QRect &orig, bool canceled);
void notifyTilingWindowDesktopChanged(Client *c, int old_desktop);
void notifyTilingWindowActivated(Client *c);
void notifyTilingWindowMaximized(Client *c, KDecorationDefines::WindowOperation op);
KDecorationDefines::Position supportedTilingResizeMode(Client *c, KDecorationDefines::Position currentMode);
@ -82,6 +81,8 @@ public Q_SLOTS:
// NOTE: debug method
void dumpTiles() const;
void notifyTilingWindowActivated(KWin::Client *c);
private:
// try to get a decent tile, either the one with
// focus or the one below the mouse.