From 0a9c25476951ff8e7d0745547252980916233b48 Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Mon, 8 Jul 2019 12:44:26 +0300 Subject: [PATCH] Fix maximize Apply Now rule Summary: AbstractClient applies maximize rules by running maximize(maximizeMode()); but because window rules are checked only in changeMaximize implementation, the if statement prevents us from applying maximize rules (m and maximizeMode() are equal). Reviewers: #kwin, romangg Reviewed By: #kwin, romangg Subscribers: romangg, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D22255 --- geometry.cpp | 3 --- shell_client.cpp | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/geometry.cpp b/geometry.cpp index e971f9488f..edbb052d2f 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -2142,9 +2142,6 @@ void AbstractClient::blockGeometryUpdates(bool block) void AbstractClient::maximize(MaximizeMode m) { - if (m == maximizeMode()) { - return; - } setMaximize(m & MaximizeVertical, m & MaximizeHorizontal); } diff --git a/shell_client.cpp b/shell_client.cpp index 65417d597d..5eb13029e9 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -827,6 +827,10 @@ void ShellClient::changeMaximize(bool horizontal, bool vertical, bool adjust) } // TODO: add more checks as in Client + if (m_requestedMaximizeMode == oldMode) { + return; + } + // call into decoration update borders if (isDecorated() && decoration()->client() && !(options->borderlessMaximizedWindows() && m_requestedMaximizeMode == KWin::MaximizeFull)) { changeMaximizeRecursion = true;