Propagate correct maximize mode to decorations

When the maximize mode changes from MaximizeFull to either
MaximizeHorizontal or MaximizeVertical, (max_mode & MaximizeFull) will
evaluate to true because MaximizeFull is defined as bitwise OR between
MaximizeHorizontal and MaximizeVertical.
This commit is contained in:
Vlad Zahorodnii 2021-05-07 17:02:26 +03:00
parent b9b349caa2
commit aeca1af4ac
2 changed files with 2 additions and 2 deletions

View file

@ -4272,7 +4272,7 @@ void X11Client::changeMaximize(bool horizontal, bool vertical, bool adjust)
emit c->maximizedHorizontallyChanged(max_mode & MaximizeHorizontal);
}
if ((max_mode == MaximizeFull) != (old_mode == MaximizeFull)) {
emit c->maximizedChanged(max_mode & MaximizeFull);
emit c->maximizedChanged(max_mode == MaximizeFull);
}
changeMaximizeRecursion = false;
}

View file

@ -1633,7 +1633,7 @@ void XdgToplevelClient::changeMaximize(bool horizontal, bool vertical, bool adju
emit c->maximizedHorizontallyChanged(m_requestedMaximizeMode & MaximizeHorizontal);
}
if ((m_requestedMaximizeMode == MaximizeFull) != (oldMode == MaximizeFull)) {
emit c->maximizedChanged(m_requestedMaximizeMode & MaximizeFull);
emit c->maximizedChanged(m_requestedMaximizeMode == MaximizeFull);
}
changeMaximizeRecursion = false;
}