diff --git a/shell_client.cpp b/shell_client.cpp index 29c9bb8a63..c4cf5ddb46 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -981,10 +981,13 @@ void ShellClient::installServerSideDecoration(KWayland::Server::ServerSideDecora connect(m_serverDecoration, &ServerSideDecorationInterface::destroyed, this, [this] { m_serverDecoration = nullptr; - if (!Workspace::self()) { + if (m_closing || !Workspace::self()) { return; } - updateDecoration(true); + if (!m_unmapped) { + // maybe delay to next event cycle in case the ShellClient is getting destroyed, too + updateDecoration(true); + } } ); if (!m_unmapped) {