diff options
author | Mikko Harju <mikko.harju@jolla.com> | 2015-06-25 15:38:28 +0300 |
---|---|---|
committer | Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | 2015-08-26 10:44:11 +0000 |
commit | 37719da680462712b975f6b734bdf8aa95df4adf (patch) | |
tree | 2160b381e9e986b5d3a57b3ba43c39b59af59dda | |
parent | e0646eee7519554cfec0926911f3dd962697048c (diff) | |
download | qtwayland-37719da680462712b975f6b734bdf8aa95df4adf.tar.gz qtwayland-37719da680462712b975f6b734bdf8aa95df4adf.tar.bz2 qtwayland-37719da680462712b975f6b734bdf8aa95df4adf.zip |
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>
-rw-r--r-- | src/compositor/wayland_wrapper/qwlsurface.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compositor/wayland_wrapper/qwlsurface.cpp b/src/compositor/wayland_wrapper/qwlsurface.cpp index 4cadbb59..2b7f21ae 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(); |