Fix protocol error when destroying xdg surfaces (v6)

Destroy role object for toplevels when destroying the xdg surface.

Task-number: QTBUG-65568
Change-Id: Ibe027c3eef8160f9fd2cfb05971c92ceb155f95b
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
This commit is contained in:
Johan Klokkhammer Helsing 2018-01-05 12:44:30 +01:00 committed by Jani Heikkinen
parent 2a82da8787
commit f94c0f2cb6

View File

@ -125,6 +125,8 @@ QWaylandXdgSurfaceV6::QWaylandXdgSurfaceV6(QWaylandXdgShellV6 *shell, ::zxdg_sur
QWaylandXdgSurfaceV6::~QWaylandXdgSurfaceV6()
{
if (m_toplevel)
zxdg_toplevel_v6_destroy(m_toplevel->object());
if (m_popup)
zxdg_popup_v6_destroy(m_popup->object());
destroy();