wayland: Fix maximize mode propagation to decoration

If the window is initially maximized, there won't be any current
decoration when XdgToplevelClient changes the maximize mode, we need to
use m_nextDecoration.

BUG: 450053
This commit is contained in:
Vlad Zahorodnii 2022-02-14 12:06:35 +02:00
parent 5ddd43958d
commit c76855520c

View file

@ -1649,9 +1649,9 @@ void XdgToplevelClient::changeMaximize(bool horizontal, bool vertical, bool adju
}
// call into decoration update borders
if (isDecorated() && decoration()->client() && !(options->borderlessMaximizedWindows() && m_requestedMaximizeMode == KWin::MaximizeFull)) {
if (m_nextDecoration && !(options->borderlessMaximizedWindows() && m_requestedMaximizeMode == KWin::MaximizeFull)) {
changeMaximizeRecursion = true;
const auto c = decoration()->client().toStrongRef();
const auto c = m_nextDecoration->client().toStrongRef();
if ((m_requestedMaximizeMode & MaximizeVertical) != (oldMode & MaximizeVertical)) {
Q_EMIT c->maximizedVerticallyChanged(m_requestedMaximizeMode & MaximizeVertical);
}