diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2018-03-09 14:40:52 +0100 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2018-03-12 11:06:31 +0000 |
commit | 366be1aafe3ed1dacc7d597e6bb2b1d509d2e908 (patch) | |
tree | 762271d6eeb33f1d5afad580603b451d6bf5b331 | |
parent | 70344cd68de5f6d73bfe17d060d1ad7abcb98704 (diff) | |
download | qtwayland-366be1aafe3ed1dacc7d597e6bb2b1d509d2e908.tar.gz |
Mocking compositor: Don't leak wl_shell_surfaces
Change-Id: Ic133b41bdcfb98418be4a0141f382734f1d5db85
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
-rw-r--r-- | tests/auto/client/shared/mocksurface.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/client/shared/mocksurface.cpp b/tests/auto/client/shared/mocksurface.cpp index 4139d64f..81a865f1 100644 --- a/tests/auto/client/shared/mocksurface.cpp +++ b/tests/auto/client/shared/mocksurface.cpp @@ -115,6 +115,10 @@ void Surface::surface_destroy_resource(Resource *) void Surface::surface_destroy(Resource *resource) { + if (m_wlShellSurface) // on wl-shell the shell surface is automatically destroyed with the surface + wl_resource_destroy(m_wlShellSurface->resource()->handle); + Q_ASSERT(!m_wlShellSurface); + Q_ASSERT(!m_xdgToplevelV6); wl_resource_destroy(resource->handle); } |