Use configChanged() signal in TilingLayouts
Since there is a signal triggered if configurations are changed, the reconfiguration method in TilingLayouts was made a slot and is connected to the appropriate signal in Workspace.
This commit is contained in:
parent
bc4fea10f3
commit
f29d151220
3 changed files with 9 additions and 8 deletions
|
@ -31,8 +31,10 @@ namespace KWin
|
|||
{
|
||||
|
||||
TilingLayout::TilingLayout(Workspace *w)
|
||||
: m_workspace(w)
|
||||
: QObject()
|
||||
, m_workspace(w)
|
||||
{
|
||||
connect(m_workspace, SIGNAL(configChanged()), this, SLOT(reconfigureTiling()));
|
||||
}
|
||||
|
||||
TilingLayout::~TilingLayout()
|
||||
|
|
|
@ -33,8 +33,9 @@ class Workspace;
|
|||
class Client;
|
||||
class Tile;
|
||||
|
||||
class TilingLayout
|
||||
class TilingLayout : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
TilingLayout(Workspace *w);
|
||||
virtual ~TilingLayout();
|
||||
|
@ -59,7 +60,6 @@ public:
|
|||
void removeTile(Client *c);
|
||||
void toggleFloatTile(Client *c);
|
||||
void swapTiles(Tile *a, Tile *b);
|
||||
void reconfigureTiling();
|
||||
|
||||
/**
|
||||
* All tiling layouts do not allow the user to manually
|
||||
|
@ -92,6 +92,9 @@ protected:
|
|||
virtual void postAddTile(Tile *t);
|
||||
virtual void preRemoveTile(Tile *t);
|
||||
|
||||
protected Q_SLOTS:
|
||||
void reconfigureTiling();
|
||||
|
||||
private:
|
||||
int findTilePos(Client *c) const;
|
||||
virtual void arrange(QRect wgeom) = 0;
|
||||
|
|
|
@ -505,6 +505,7 @@ Workspace::~Workspace()
|
|||
{
|
||||
finishCompositing();
|
||||
blockStackingUpdates(true);
|
||||
delete m_tiling;
|
||||
|
||||
// TODO: grabXServer();
|
||||
|
||||
|
@ -528,7 +529,6 @@ Workspace::~Workspace()
|
|||
delete desktop_change_osd;
|
||||
#endif
|
||||
delete m_outline;
|
||||
delete m_tiling;
|
||||
discardPopup();
|
||||
XDeleteProperty(display(), rootWindow(), atoms->kwin_running);
|
||||
|
||||
|
@ -1028,10 +1028,6 @@ void Workspace::slotReconfigure()
|
|||
}
|
||||
|
||||
m_tiling->setTilingEnabled(options->tilingOn);
|
||||
foreach (TilingLayout * layout, m_tiling->getTilingLayouts()) {
|
||||
if (layout)
|
||||
layout->reconfigureTiling();
|
||||
}
|
||||
// just so that we reset windows in the right manner, 'activate' the current active window
|
||||
m_tiling->notifyTilingWindowActivated(activeClient());
|
||||
if (hasDecorationPlugin()) {
|
||||
|
|
Loading…
Reference in a new issue