Move functionality of Client::updateLayer to AbstractClient

With transient support in AbstractClient we can provide the
functionality in AbstractClient.
This commit is contained in:
Martin Gräßlin 2015-09-14 12:04:23 +02:00
parent b199356774
commit a421f546cd
4 changed files with 13 additions and 6 deletions

View file

@ -190,6 +190,15 @@ void AbstractClient::doSetActive()
}
void AbstractClient::updateLayer()
{
StackingUpdatesBlocker blocker(workspace());
invalidateLayer(); // invalidate, will be updated when doing restacking
for (auto it = transients().constBegin(),
end = transients().constEnd(); it != end; ++it)
(*it)->updateLayer();
}
void AbstractClient::invalidateLayer()
{
}

View file

@ -505,6 +505,8 @@ protected:
**/
void removeTransientFromList(AbstractClient* cl);
virtual void invalidateLayer();
private:
void handlePaletteChange();
QSharedPointer<TabBox::TabBoxClientImpl> m_tabBoxClient;

View file

@ -267,7 +267,6 @@ public:
virtual Layer layer() const;
Layer belongsToLayer() const;
void invalidateLayer();
void updateLayer() override;
int sessionStackingOrder() const;
@ -521,6 +520,7 @@ protected:
void doMinimize() override;
void doSetSkipPager() override;
void doSetSkipTaskbar() override;
void invalidateLayer() override;
private Q_SLOTS:
void delayedSetShortcut();

View file

@ -867,11 +867,7 @@ void Client::updateLayer()
{
if (layer() == belongsToLayer())
return;
StackingUpdatesBlocker blocker(workspace());
invalidateLayer(); // invalidate, will be updated when doing restacking
for (auto it = transients().constBegin(),
end = transients().constEnd(); it != end; ++it)
(*it)->updateLayer();
AbstractClient::updateLayer();
}
bool rec_checkTransientOnTop(const QList<AbstractClient*> &transients, const Client *topmost)