summaryrefslogtreecommitdiffstats
path: root/src/compositor
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@theqtcompany.com>2015-09-28 15:34:52 +0200
committerPaul Olav Tvete <paul.tvete@theqtcompany.com>2015-09-29 11:50:35 +0000
commit8b2c8f22b0157311ff5a0e1df4b24fc568a15660 (patch)
treeb2533cd6fc3532bf3569237c6a2e0a8933f7dae5 /src/compositor
parentb30356fdcb14db2e82a36ba805529010d985e018 (diff)
Improve notification at surface destruction
Change-Id: I7e9cb1a0ed728f21af4f1e00ee66dfe86f0dd6a4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/compositor')
-rw-r--r--src/compositor/compositor_api/qwaylandsurface.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compositor/compositor_api/qwaylandsurface.cpp b/src/compositor/compositor_api/qwaylandsurface.cpp
index da6a120ae..c75d07e7f 100644
--- a/src/compositor/compositor_api/qwaylandsurface.cpp
+++ b/src/compositor/compositor_api/qwaylandsurface.cpp
@@ -177,6 +177,10 @@ void QWaylandSurfacePrivate::notifyViewsAboutDestruction()
foreach (QWaylandView *view, views) {
QWaylandViewPrivate::get(view)->markSurfaceAsDestroyed(q);
}
+ if (mapped) {
+ mapped = false;
+ emit q->mappedChanged();
+ }
}
#ifndef QT_NO_DEBUG
@@ -206,8 +210,8 @@ void QWaylandSurfacePrivate::surface_destroy_resource(Resource *)
notifyViewsAboutDestruction();
destroyed = true;
- q->destroy();
emit q->surfaceDestroyed();
+ q->destroy();
}
void QWaylandSurfacePrivate::surface_destroy(Resource *resource)
@@ -367,10 +371,6 @@ QWaylandSurface::~QWaylandSurface()
Q_D(QWaylandSurface);
QWaylandCompositorPrivate::get(d->compositor)->unregisterSurface(this);
d->notifyViewsAboutDestruction();
- if (d->mapped) {
- d->mapped = false;
- emit mappedChanged();
- }
}
void QWaylandSurface::initialize(QWaylandCompositor *compositor, QWaylandClient *client, uint id, int version)