From 35bcc9fc351933d086175fb6f27f85fa6e757161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Fl=C3=B6ser?= Date: Sun, 1 Oct 2017 21:37:18 +0200 Subject: [PATCH] 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 --- rules.cpp | 2 +- rules.h | 2 +- workspace.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rules.cpp b/rules.cpp index fd3a4f80f2..031dde3543 100644 --- a/rules.cpp +++ b/rules.cpp @@ -1108,7 +1108,7 @@ void RuleBook::cleanupTemporaryRules() QTimer::singleShot(60000, this, SLOT(cleanupTemporaryRules())); } -void RuleBook::discardUsed(Client* c, bool withdrawn) +void RuleBook::discardUsed(AbstractClient* c, bool withdrawn) { bool updated = false; for (QList< Rules* >::Iterator it = m_rules.begin(); diff --git a/rules.h b/rules.h index 8e230c8465..007ce5b71b 100644 --- a/rules.h +++ b/rules.h @@ -293,7 +293,7 @@ class KWIN_EXPORT RuleBook : public QObject public: virtual ~RuleBook(); WindowRules find(const AbstractClient*, bool); - void discardUsed(Client* c, bool withdraw); + void discardUsed(AbstractClient* c, bool withdraw); void setUpdatesDisabled(bool disable); bool areUpdatesDisabled() const; void load(); diff --git a/workspace.cpp b/workspace.cpp index 94e9f89497..0a4303482e 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -851,8 +851,8 @@ void Workspace::slotReconfigure() updateToolWindows(true); RuleBook::self()->load(); - for (ClientList::Iterator it = clients.begin(); - it != clients.end(); + for (auto it = m_allClients.begin(); + it != m_allClients.end(); ++it) { (*it)->setupWindowRules(true); (*it)->applyWindowRules();