summaryrefslogtreecommitdiffstats
path: root/src/compositor/wayland_wrapper/wlcompositor.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2012-05-18 23:32:36 +0200
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2012-05-19 07:58:30 +0200
commit3836847ab68c52e4fe39dff94649534ffda99418 (patch)
tree875e066d583b9c3bcf9df046b277cc026b7bc0f2 /src/compositor/wayland_wrapper/wlcompositor.cpp
parent984f2ef4b3037d7ff68d1de890ac8006c976efe3 (diff)
Implemented graceful quitting of clients.
Send a quit message to let the client shut down cleanly. Change-Id: I5f99c9b92341fdb5f1b171f6fe36f26bf8a47026 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Diffstat (limited to 'src/compositor/wayland_wrapper/wlcompositor.cpp')
-rw-r--r--src/compositor/wayland_wrapper/wlcompositor.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compositor/wayland_wrapper/wlcompositor.cpp b/src/compositor/wayland_wrapper/wlcompositor.cpp
index 9f00045da..5a1bf6d14 100644
--- a/src/compositor/wayland_wrapper/wlcompositor.cpp
+++ b/src/compositor/wayland_wrapper/wlcompositor.cpp
@@ -294,8 +294,13 @@ void Compositor::markSurfaceAsDirty(Wayland::Surface *surface)
void Compositor::destroyClient(WaylandClient *c)
{
wl_client *client = static_cast<wl_client *>(c);
- if (client) {
+ if (!client)
+ return;
+
+ if (m_windowManagerIntegration->managedClient(client)) {
+ m_windowManagerIntegration->sendQuitMessage(client);
m_windowManagerIntegration->removeClient(client);
+ } else {
wl_client_destroy(client);
}
}