[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
This commit is contained in:
parent
348e72c56e
commit
25276d3058
1 changed files with 2 additions and 0 deletions
|
@ -1040,6 +1040,8 @@ WindowPixmap::WindowPixmap(const QPointer<KWayland::Server::SubSurfaceInterface>
|
||||||
|
|
||||||
WindowPixmap::~WindowPixmap()
|
WindowPixmap::~WindowPixmap()
|
||||||
{
|
{
|
||||||
|
qDeleteAll(m_children);
|
||||||
|
|
||||||
if (m_pixmap != XCB_WINDOW_NONE) {
|
if (m_pixmap != XCB_WINDOW_NONE) {
|
||||||
xcb_free_pixmap(connection(), m_pixmap);
|
xcb_free_pixmap(connection(), m_pixmap);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue