Port RuleBook::discardUsed from Client to AbstractClient

Summary: Prepares the Rules update on reconfigure for Wayland windows.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8094
This commit is contained in:
Martin Flöser 2017-10-01 21:37:18 +02:00
parent 0372fdaf92
commit 35bcc9fc35
3 changed files with 4 additions and 4 deletions

View file

@ -1108,7 +1108,7 @@ void RuleBook::cleanupTemporaryRules()
QTimer::singleShot(60000, this, SLOT(cleanupTemporaryRules())); QTimer::singleShot(60000, this, SLOT(cleanupTemporaryRules()));
} }
void RuleBook::discardUsed(Client* c, bool withdrawn) void RuleBook::discardUsed(AbstractClient* c, bool withdrawn)
{ {
bool updated = false; bool updated = false;
for (QList< Rules* >::Iterator it = m_rules.begin(); for (QList< Rules* >::Iterator it = m_rules.begin();

View file

@ -293,7 +293,7 @@ class KWIN_EXPORT RuleBook : public QObject
public: public:
virtual ~RuleBook(); virtual ~RuleBook();
WindowRules find(const AbstractClient*, bool); WindowRules find(const AbstractClient*, bool);
void discardUsed(Client* c, bool withdraw); void discardUsed(AbstractClient* c, bool withdraw);
void setUpdatesDisabled(bool disable); void setUpdatesDisabled(bool disable);
bool areUpdatesDisabled() const; bool areUpdatesDisabled() const;
void load(); void load();

View file

@ -851,8 +851,8 @@ void Workspace::slotReconfigure()
updateToolWindows(true); updateToolWindows(true);
RuleBook::self()->load(); RuleBook::self()->load();
for (ClientList::Iterator it = clients.begin(); for (auto it = m_allClients.begin();
it != clients.end(); it != m_allClients.end();
++it) { ++it) {
(*it)->setupWindowRules(true); (*it)->setupWindowRules(true);
(*it)->applyWindowRules(); (*it)->applyWindowRules();