From 9a965405e3ea6075f35fc6b06898bcbe15841112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Fl=C3=B6ser?= Date: Sun, 1 Oct 2017 21:48:57 +0200 Subject: [PATCH] Support updating deco for changes of borderless maximize windows config Summary: So far only updated the Clients, now also ShellClient. Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D8095 --- abstract_client.cpp | 5 +++++ abstract_client.h | 1 + client.h | 2 +- workspace.cpp | 4 ++-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/abstract_client.cpp b/abstract_client.cpp index 0a56538c47..cf85979d5c 100644 --- a/abstract_client.cpp +++ b/abstract_client.cpp @@ -1797,4 +1797,9 @@ void AbstractClient::setOnActivities(QStringList newActivitiesList) Q_UNUSED(newActivitiesList) } +void AbstractClient::checkNoBorder() +{ + setNoBorder(false); +} + } diff --git a/abstract_client.h b/abstract_client.h index 4e1ffd7155..342e3649c4 100644 --- a/abstract_client.h +++ b/abstract_client.h @@ -460,6 +460,7 @@ public: virtual QRect iconGeometry() const; virtual bool userCanSetFullScreen() const = 0; virtual bool userCanSetNoBorder() const = 0; + virtual void checkNoBorder(); virtual void setOnActivities(QStringList newActivitiesList); virtual void setOnAllActivities(bool set) = 0; const WindowRules* rules() const { diff --git a/client.h b/client.h index 1af55b79f5..e7d116e169 100644 --- a/client.h +++ b/client.h @@ -162,7 +162,7 @@ public: bool noBorder() const override; void setNoBorder(bool set) override; bool userCanSetNoBorder() const override; - void checkNoBorder(); + void checkNoBorder() override; int sessionStackingOrder() const; diff --git a/workspace.cpp b/workspace.cpp index 89b8c08ca7..02ccf5aaa7 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -865,8 +865,8 @@ void Workspace::slotReconfigure() !options->borderlessMaximizedWindows()) { // in case borderless maximized windows option changed and new option // is to have borders, we need to unset the borders for all maximized windows - for (ClientList::Iterator it = clients.begin(); - it != clients.end(); + for (auto it = m_allClients.begin(); + it != m_allClients.end(); ++it) { if ((*it)->maximizeMode() == MaximizeFull) (*it)->checkNoBorder();