From f7a67e0edc0e77ef5a2c5e2ed7faa4a85a802717 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 26 Jun 2020 12:29:08 +0300 Subject: [PATCH] [wayland] Ignore decoration updates if initial state isn't committed yet or else we might send an unexpected configure event. --- xdgshellclient.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/xdgshellclient.cpp b/xdgshellclient.cpp index b8f2a87755..f2314177d0 100644 --- a/xdgshellclient.cpp +++ b/xdgshellclient.cpp @@ -1330,6 +1330,8 @@ void XdgToplevelClient::initialize() bool needsPlacement = !isInitialPositionSet(); + updateDecoration(false, false); + if (supportsWindowRules()) { setupWindowRules(false); @@ -1449,13 +1451,15 @@ void XdgToplevelClient::installXdgDecoration(XdgToplevelDecorationV1Interface *d m_xdgDecoration = decoration; connect(m_xdgDecoration, &XdgToplevelDecorationV1Interface::destroyed, this, [this] { - if (!isClosing()) { + if (!isClosing() && m_isInitialized) { updateDecoration(/* check_workspace_pos */ true); } }); connect(m_xdgDecoration, &XdgToplevelDecorationV1Interface::preferredModeChanged, this, [this] { - // force is true as we must send a new configure response. - updateDecoration(/* check_workspace_pos */ false, /* force */ true); + if (m_isInitialized) { + // force is true as we must send a new configure response. + updateDecoration(/* check_workspace_pos */ false, /* force */ true); + } }); }