wayland: Break xdg-foreign connection when window is closed

When a window is closed, we don't want to listen for the
WaylandServer::foreignTransientChanged signal anymore as it can lead to
a crash.
This commit is contained in:
Vlad Zahorodnii 2023-04-07 23:36:06 +03:00
parent cd812fab0f
commit 4691086389

View file

@ -592,6 +592,9 @@ void XdgToplevelWindow::handleRoleDestroyed()
m_shellSurface->disconnect(this); m_shellSurface->disconnect(this);
disconnect(waylandServer(), &WaylandServer::foreignTransientChanged,
this, &XdgToplevelWindow::handleForeignTransientForChanged);
XdgSurfaceWindow::handleRoleDestroyed(); XdgSurfaceWindow::handleRoleDestroyed();
} }