Commit 37719da6 authored by Mikko Harju's avatar Mikko Harju Committed by Pier Luigi Fiorini
Browse files

Reset surface transientParent when the parent is destroyed.


If a transient parent of a surface is destroyed before the surface
itself, reset all references to that parent surface.

Change-Id: I5b748099d8a5502632d8846c5de5381b5f28b665
Reviewed-by: default avatarGiulio Camuffo <giulio.camuffo@jollamobile.com>
Showing with 8 additions and 0 deletions
...@@ -408,6 +408,14 @@ void Surface::surface_destroy_resource(Resource *) ...@@ -408,6 +408,14 @@ void Surface::surface_destroy_resource(Resource *)
m_extendedSurface = 0; m_extendedSurface = 0;
} }
if (transientParent()) {
foreach (Surface *surface, compositor()->surfaces()) {
if (surface->transientParent() == this) {
surface->setTransientParent(0);
}
}
}
m_destroyed = true; m_destroyed = true;
m_waylandSurface->destroy(); m_waylandSurface->destroy();
emit m_waylandSurface->surfaceDestroyed(); emit m_waylandSurface->surfaceDestroyed();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment