From 54d770d5ca22f4ed75084d2bfb63395b6d83cd63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 23 May 2016 10:01:31 +0200 Subject: [PATCH] Destroy decoration when DecorationBridge is destroyed When KWin goes down the DecorationBridge might be destroyed before the last AbstractClient is destroyed. Thus we should destroy the Decoration when the DecorationBridge gets destroyed. --- abstract_client.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/abstract_client.cpp b/abstract_client.cpp index b3230300cf..ab40c7b509 100644 --- a/abstract_client.cpp +++ b/abstract_client.cpp @@ -20,6 +20,7 @@ along with this program. If not, see . #include "abstract_client.h" #include "decorations/decoratedclient.h" #include "decorations/decorationpalette.h" +#include "decorations/decorationbridge.h" #include "cursor.h" #include "effects.h" #include "focuschain.h" @@ -64,6 +65,8 @@ AbstractClient::AbstractClient() connect(this, &AbstractClient::clientFinishUserMovedResized, this, &AbstractClient::setupCheckScreenConnection); connect(this, &AbstractClient::paletteChanged, this, &AbstractClient::triggerDecorationRepaint); + + connect(Decoration::DecorationBridge::self(), &QObject::destroyed, this, &AbstractClient::destroyDecoration); } AbstractClient::~AbstractClient()