From c76855520cf35f1d927d829b2528a5a7eb0091ab Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Mon, 14 Feb 2022 12:06:35 +0200 Subject: [PATCH] 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 --- src/xdgshellclient.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xdgshellclient.cpp b/src/xdgshellclient.cpp index 053eeac376..760aeedefe 100644 --- a/src/xdgshellclient.cpp +++ b/src/xdgshellclient.cpp @@ -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); }