aboutsummaryrefslogtreecommitdiff
path: root/sway/container.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2015-12-29 08:22:32 -0500
committerDrew DeVault <sir@cmpwn.com>2015-12-29 08:22:32 -0500
commit5292860b9202336d721089ecc9b0f3906aa47a33 (patch)
tree2ff85443a9587546176620d722028af59388d0da /sway/container.c
parentd409620a55c0552d47a75502a35e7c8bde60685d (diff)
parent16b8c2e915fb7972ad5190ae2591b2d71789f477 (diff)
Merge pull request #418 from mikkeloscar/sway-handle-sigterm
Handle SIGTERM sent to sway
Diffstat (limited to 'sway/container.c')
-rw-r--r--sway/container.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sway/container.c b/sway/container.c
index e6fa4f37..dcf4dcc8 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -796,3 +796,13 @@ void add_gaps(swayc_t *view, void *_data) {
}
}
}
+
+static void close_view(swayc_t *container, void *data) {
+ if (container->type == C_VIEW) {
+ wlc_view_close(container->handle);
+ }
+}
+
+void close_views(swayc_t *container) {
+ container_map(container, close_view, NULL);
+}