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
This commit is contained in:
Vlad Zagorodniy 2019-07-08 12:44:26 +03:00
parent c0f994dafc
commit 0a9c254769
2 changed files with 4 additions and 3 deletions

View file

@ -2142,9 +2142,6 @@ void AbstractClient::blockGeometryUpdates(bool block)
void AbstractClient::maximize(MaximizeMode m)
{
if (m == maximizeMode()) {
return;
}
setMaximize(m & MaximizeVertical, m & MaximizeHorizontal);
}

View file

@ -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;