From 6139ea787454881999ebfb5c0e5ca07ef3e8f8c4 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 16 Jul 2020 17:02:06 +0300 Subject: [PATCH] Destroy xdg shell clients when surface is still alive Destroy xdg shell clients when the aboutToBeDestroyed() signal has been emitted in order to ensure that no NULL surface is going to be accessed. --- xdgshellclient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xdgshellclient.cpp b/xdgshellclient.cpp index 5e1ed2a90c..d8a1655cb4 100644 --- a/xdgshellclient.cpp +++ b/xdgshellclient.cpp @@ -74,7 +74,7 @@ XdgSurfaceClient::XdgSurfaceClient(XdgSurfaceInterface *shellSurface) connect(shellSurface->surface(), &SurfaceInterface::mapped, this, &XdgSurfaceClient::setReadyForPainting); #endif - connect(shellSurface->surface(), &SurfaceInterface::destroyed, + connect(shellSurface->surface(), &SurfaceInterface::aboutToBeDestroyed, this, &XdgSurfaceClient::destroyClient); // The effective window geometry is determined by two things: (a) the rectangle that bounds