Don't update decoration when ServerSideDecoration gets destroyed and ShellClient is unmapped
Summary: Most likely the window is in the process of getting destroyed. In that case the following destroy of the Surface is also going to destroy the decoration. This was causing an interesting effect with the QQuickRenderControl used by Aurorae. When getting destroyed it ensures that all posted events get processed. This includes the destroy of the Surface which entered ShellClient::destroyClient which again destroyed the decoration. In other words a recursive destroy which ended with wonderful crashers due to double deletions. If the window is not unmapped this might still cause problems: more testing needed. Reviewers: #plasma Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D1641
This commit is contained in:
parent
50184cc53f
commit
3c4619893c
1 changed files with 5 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue