From 8af3eef9cd9e5dcfcd39ae22b632db5ce56d8509 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 16 Jan 2020 15:58:49 +0200 Subject: [PATCH] [x11] Apply "Block compositing" rule right away Summary: When the user changes "Block compositing" rule, apply it immediately. BUG: 415903 Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D26708 --- abstract_client.h | 2 +- x11client.cpp | 6 ++++++ x11client.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/abstract_client.h b/abstract_client.h index a69c63cdce..beb53d5be0 100644 --- a/abstract_client.h +++ b/abstract_client.h @@ -557,7 +557,7 @@ public: void removeRule(Rules* r); void setupWindowRules(bool ignore_temporary); void evaluateWindowRules(); - void applyWindowRules(); + virtual void applyWindowRules(); virtual void takeFocus() = 0; virtual bool wantsInput() const = 0; /** diff --git a/x11client.cpp b/x11client.cpp index 3e645e84bd..9838e741a5 100644 --- a/x11client.cpp +++ b/x11client.cpp @@ -4944,4 +4944,10 @@ bool X11Client::hasOffscreenXineramaStrut() const return !region.isEmpty(); } +void X11Client::applyWindowRules() +{ + AbstractClient::applyWindowRules(); + setBlockingCompositing(info->isBlockingCompositing()); +} + } // namespace diff --git a/x11client.h b/x11client.h index 6b3b2c050d..e59dd5c5ff 100644 --- a/x11client.h +++ b/x11client.h @@ -109,6 +109,7 @@ public: void checkGroup(Group* gr = nullptr, bool force = false); void changeClientLeaderGroup(Group* gr); void updateWindowRules(Rules::Types selection) override; + void applyWindowRules() override; void updateFullscreenMonitors(NETFullscreenMonitors topology); bool hasNETSupport() const;