summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMikko Harju <mikko.harju@jolla.com>2015-06-25 15:38:28 +0300
committerPier Luigi Fiorini <pierluigi.fiorini@gmail.com>2015-08-26 10:44:11 +0000
commit37719da680462712b975f6b734bdf8aa95df4adf (patch)
tree2160b381e9e986b5d3a57b3ba43c39b59af59dda /src
parente0646eee7519554cfec0926911f3dd962697048c (diff)
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: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Diffstat (limited to 'src')
-rw-r--r--src/compositor/wayland_wrapper/qwlsurface.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compositor/wayland_wrapper/qwlsurface.cpp b/src/compositor/wayland_wrapper/qwlsurface.cpp
index 4cadbb590..2b7f21aee 100644
--- a/src/compositor/wayland_wrapper/qwlsurface.cpp
+++ b/src/compositor/wayland_wrapper/qwlsurface.cpp
@@ -408,6 +408,14 @@ void Surface::surface_destroy_resource(Resource *)
m_extendedSurface = 0;
}
+ if (transientParent()) {
+ foreach (Surface *surface, compositor()->surfaces()) {
+ if (surface->transientParent() == this) {
+ surface->setTransientParent(0);
+ }
+ }
+ }
+
m_destroyed = true;
m_waylandSurface->destroy();
emit m_waylandSurface->surfaceDestroyed();