From 25276d30583c2b5d5c15aba077511458011d91d4 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 19 Mar 2020 19:25:55 +0200 Subject: [PATCH] [wayland] Recursively destroy WindowPixmap objects Summary: We need to destroy the root WindowPixmap together with all of its children; otherwise, buffers that are attached to subsurfaces will not be released. Test Plan: weston-subsurfaces doesn't quit with an error message saying that all buffers are held by the compositor. Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D28145 --- scene.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scene.cpp b/scene.cpp index 11714a846c..8a83a85bf9 100644 --- a/scene.cpp +++ b/scene.cpp @@ -1040,6 +1040,8 @@ WindowPixmap::WindowPixmap(const QPointer WindowPixmap::~WindowPixmap() { + qDeleteAll(m_children); + if (m_pixmap != XCB_WINDOW_NONE) { xcb_free_pixmap(connection(), m_pixmap); }